Skip to content

Conversation

@adamwathan
Copy link
Member

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 🙌

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()

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry dad, fixed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

Copy link
Member

@reinink reinink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proceed

@adamwathan adamwathan merged commit 52f6fb2 into master Nov 3, 2017
@adamwathan adamwathan deleted the watch-config branch November 3, 2017 15:04
Copy link

@vcavallo vcavallo left a 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.

@anantakrishna
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triggering rebuild on config.js change

5 participants