-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Replaced fwd slashes with backslashes for win to fix sass deps watch #1602
Conversation
src/assets/SASSAsset.js
Outdated
@@ -65,6 +65,9 @@ class SASSAsset extends Asset { | |||
|
|||
collectDependencies() { | |||
for (let dep of this.ast.stats.includedFiles) { | |||
if (os.platform() === 'win32') { |
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.
What about moving this to?
https://github.com/parcel-bundler/parcel/blob/master/src/Bundler.js#L394
and
https://github.com/parcel-bundler/parcel/blob/master/src/Bundler.js#L704
This way this applies to every asset type, not just scss.
Unfortunately, I'm not able to test, so I can't test if this would work
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.
maybe you could use path.normalize
for this https://nodejs.org/api/path.html#path_path_normalize_path
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 just did another commit, moving the fix in Bundler.js like suggested and using path.normalize. I'm not sure I put it in the right positions, but as far as I could test it, it works. Thanks for your efforts!
actually I believe that since we are calling |
Thank you for merging @devongovett keep up the awesome work. |
Running
parcel watch
on Windows wouldn't re-build scss files when only partial sass dependencies, imported in the main .scss file, were modified. The reason is Windows uses forward slashes/
in the path of these dependencies. #1451