Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

css files have incorrect hashes #1388

Closed
benmccann opened this issue Aug 11, 2020 · 3 comments · Fixed by #1415
Closed

css files have incorrect hashes #1388

benmccann opened this issue Aug 11, 2020 · 3 comments · Fixed by #1415
Labels

Comments

@benmccann
Copy link
Member

The CSS files are getting the hash for the JS files.

E.g. npm run build on hn.svelte.dev returns:

__sapper__/build/client/[id].1ed50b8f.js
__sapper__/build/client/[id].1ed50b8f.css

The name for CSS is chosen by replacing the .js of the JavaScript file path with .css:

const output_file_name = chunk.file.replace(/\.js$/, '.css');

@benmccann benmccann added the bug label Aug 11, 2020
@ajbouh
Copy link

ajbouh commented Aug 11, 2020

To fix this (assuming it's actually a bug) we need to stop blindly replacing .js with .css in the extract_css codepath

@arekbartnik
Copy link
Contributor

@benmccann why is this an error?

@benmccann
Copy link
Member Author

If you change only the css and not the js I believe the file hash will not change as it should

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

Successfully merging a pull request may close this issue.

3 participants