Hari 4 days ago committed by GitHub
commit ae414945b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
feat: added filename for css hasing

@ -70,8 +70,10 @@ const component_options = {
return input;
}),
cssHash: fun(({ css, hash }) => {
return `svelte-${hash(css)}`;
cssHash: fun(({ css, filename, name, hash }) => {
//either use extracted filename or component name
filename = filename ? filename.replace(/^.*[\\/]/, '') : name;
return `svelte-${hash(filename ?? css)}`;
}),
// TODO this is a sourcemap option, would be good to put under a sourcemap namespace

Loading…
Cancel
Save