mirror of https://github.com/sveltejs/svelte
Merge branch 'feat/allow-custom-scope-class' of https://github.com/kaisermann/svelte into kaisermann-feat/allow-custom-scope-class
commit
920bbae708
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
filename: 'src/components/FooSwitcher.svelte',
|
||||
cssHash({ hash, name, filename }) {
|
||||
const minFilename = filename
|
||||
.split('/')
|
||||
.map(i => i.charAt(0).toLowerCase())
|
||||
.join('');
|
||||
return `sv-${name}-${minFilename}-${hash}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -0,0 +1 @@
|
||||
div.sv-FooSwitcher-scf-bzh57p{color:red}
|
||||
@ -0,0 +1,7 @@
|
||||
<div>red</div>
|
||||
|
||||
<style>
|
||||
div {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in new issue