-
Notifications
You must be signed in to change notification settings - Fork 40
Vite: Changes are not adopted during development. #84
Comments
Can you provide a repository that reproduces? Things seem to work as expected when I set up a Vite project locally. |
Here's an example of a Vite project that seems to work as expected for me: |
Hi, yes here a repo: https://github.com/leanupjs/tailwindcss-jit You can compare the behavior like this: npm start # vite
npm run webpack:start # webpack |
It works with vue. |
Any chance you can provide a minimal reproduction? Going to take a lot for me to figure out what's actually happening here. Could be the imported Vite config, Sass, Preact, some weird build config somewhere, not sure. Spent 10 minutes on it now but just feels like I'm throwing effort in random places — a minimal reproduction from an empty Vite project would help a lot. |
I had a typo in my purge config, works as expected in a vanilla Vite app with Preact and Typescript: https://github.com/adamwathan/jit-vite-preact @deleonio are you able to reproduce by making some minimal set of changes to my working demo above? |
Hello @adamwathan, I have forked your repo and break it: adamwathan/jit-vite-preact#1 |
Was able to solve this, the problem is when you use a custom PostCSS config through your vite.config.js file, for some reason Vite does not provide PostCSS with the default NODE_ENV variable, so NODE_ENV is undefined and it needs to be As long as you explicitly set one of those two environment variables on the command line in your development script everything works 👍🏻 |
Thank you @adamwathan |
Hi, how do I set |
For context, I had changed |
The initial build ist okay, but after that all code changes are not adopted.
FYI: With webpack everythink is fine.
The text was updated successfully, but these errors were encountered: