Answer the question
In order to leave comments, you need to log in
Why doesn't Nuxt in Docker keep track of file changes?
Why doesn't Nuxt in Docker keep track of file changes?
For example, when I see the development with the same php, then the volumes are synchronized.
Thus, I can develop and test in docker
. But this did not work with Nuxt, the changes are not applied immediately, but only after a reboot.
docker-compose restart
Dockerfile-dev
FROM node:lts-alpine
RUN mkdir -p /nuxt-app/
WORKDIR /nuxt-app/
COPY ./package*.json /nuxt-app/
RUN npm install
CMD ["npm", "run", "dev"]
# Nuxt publication
nuxt-public:
container_name: cc.nuxt_public
build:
context: ./nuxt_public
dockerfile: Dockerfile-dev
volumes:
- ./nuxt_public:/nuxt-app/
ports:
- "127.0.0.100:3600:3000"
expose:
- "3000"
Answer the question
In order to leave comments, you need to log in
Also faced the same problem. I dug up a solution that, in principle, works: add the following to nuxt.config.js :
watchers: {
webpack: {
aggregateTimeout: 300,
poll: 1000
}
}
Do you have nodemon installed?
https://medium.com/i22digital/development-setup-wi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question