-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Register config file with Webpack for watching #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This change tells Webpack (for those using it) that the config file used should be tracked as a dependency and that the CSS should be re-compiled if that config file changes. It's careful to make sure the config file is loaded fresh every single time to avoid weird caching issues.
| @@ -1,4 +1,5 @@ | |||
| var config = require('../defaultConfig') | |||
| var config = require('../lib/index').defaultConfig() | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this extra line return really necessary Adam?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry dad, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this old thread and it made me very happy.
|
Hi guys. Any idea how to make it work with https://github.com/parcel-bundler/parcel v1.12? Currently I have to remove cache directory in order for it to catch the changes and re-bundle CSS. Oh, before posting this comment I've found a related Parcel issue parcel-bundler/parcel#2983, and it turns out that the pull request parcel-bundler/parcel#3980 was merged into Parcel 2.0 (not 1.x). |


This change tells Webpack (for those using it) that the config file used should be tracked as a dependency and that the CSS should be re-compiled if that config file changes.
It's careful to make sure the config file is loaded fresh every single time to avoid weird caching issues.
Resolves #55 🙌