Skip to main content
Version: 0.2.0

Svelte

If you're using a standalone .scss, there's no extra configuration needed. However, if you want to use it inside components, you have to do some setup with svelte-preprocess

Setup includePaths with svelte-preprocess#

We assume you already have svelte-preprocess installed and set-up, if not, check out this article to get it set-up

Once it's setup, modify your call to sveltePreprocess to look like this:

sveltePreprocess({
scss: {
includePaths: ["node_modules/stormy-scss/dist"]
},
/* Your other options*/
})

You should now be able to import Stormy in your components like this:

<!-- Your markup -->
<style lang="scss">
@use "stormy";
@use "stormy/text" as stormy-text;
.foo {
@include stormy.shadow();
}
</style>

Note that the import is "stormy", not "stormy-scss"