ARTICLE AD BOX
I'm attempting to containerise a laravel project which will be running vue, as webpack is now not a standard and vite is, for me to run vite it would then refresh if something in the project has changed.
I have npm running in a different service, this is only ran when needed and when I run npm run dev the vite development server starts which is great, but I find that nothing is being noticed by it.
my docker compose file is:
ervices: nginx: #image: nginx:stable-apline build: context: . ports: - 80:80 volumes: - ./src:/var/www/html depends_on: - mysql - php mysql: image: mariadb:10.5.8 ports: - 3306:3306 environment: MYSQL_DATABASE: laravel MYSQL_USER: laravel MYSQL_PASSWORD: secret MYSQL_ROOT_PASSWORD: secret volumes: - ./mysql:/var/lib/mysql php: build: context: . dockerfile: php.dockerfile volumes: - ./src:/var/www/html composer: build: context: . dockerfile: composer.dockerfile volumes: - ./src:/var/www/html working_dir: /var/www/html node: image: node:current-alpine volumes: - ./src:/var/www/html entrypoint: ["npm"] working_dir: /var/www/htmlWhen my nginx container is running, I get the following in the console:
My vite config is as follows:
import { defineConfig } from 'vite'; import laravel from 'laravel-vite-plugin'; import tailwindcss from '@tailwindcss/vite'; import vue from '@vitejs/plugin-vue'; export default defineConfig({ server: { strictPort: true, port: 5173, host: '127.0.0.1', origin: 'http://localhost:5173', hmr: { host: 'localhost', }, watch: { usePolling: true } }, plugins: [ laravel({ input: ['resources/css/app.css', 'resources/js/app.js'], refresh: true, }), tailwindcss(), vue() ] });Any thoughts?
Thanks in advance.

