Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

changing imported css will be ignored in chunk hash #16

Open
dionysiusmarquis opened this issue Dec 10, 2020 · 2 comments
Open

changing imported css will be ignored in chunk hash #16

dionysiusmarquis opened this issue Dec 10, 2020 · 2 comments

Comments

@dionysiusmarquis
Copy link

I tried to use Tailwind with sapper and came down to this plugin, trying to fix some issues.

My "journey" so far:
sveltejs/svelte#5745
sveltejs/sapper#1660
sveltejs/sapper#1665 (comment)

tldr:
As this plugin changes chunk code without augmentChunkHash, imported css file code changes will not change the chunk's hash. This is a major problem for caching environments as they will potentially miss css changes. It terms of sapper it breaks also the dev environment as the css changes aren't properly applied. I could already fix it on sapper level (sveltejs/sapper#1665) but realised that it might could and/or should also be solved in this plugin.

@benmccann
Copy link
Contributor

If I understood the issue correctly, it was that the .js file was not being updated to point at the updated .css file name. Is that right? If so, then I'm not sure there's anything to do here since it's the .css chunks that are updated by this plugin and Sapper that's responsible for loading them in the .js files

Let me know what you think. I want to make sure we're fixing this in the right place wherever that is

@dionysiusmarquis
Copy link
Author

If only css chunks are affected in places chunk.code = … is happening, everything should be all right, I guess. Not really sure if that would also cover pcss @import etc. I didn’t really dig deep here tbh. But if there is also js chunk code changes happening you would need to augment the hashes.
Could be the wrong place here indeed. Good catch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants