Add hot reload to imported SCSS files on SvelteKit
See original GitHub issueAs we chatted about it on Discord, that would be very cool to have HMR on a global SCSS file for SvelteKit like that:
// $layout.svelte
<style lang="scss" global>
@import "../style/style.scss";
</style>
Right now it doesn’t seem to hot reload the changes when changing an imported SCSS file.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
How to add SCSS or SASS to SvelteKit - Hao's learning log
In this blog post, we'll go over the simplest way to achieve this. For people who are new to Svelte or SvelteKit, the...
Read more >hot reloading doesn't work on styles "text/sass" with @import #71
Started here: rollup-plugin-svelte. The problem: I have a component using sass styles with svelte-preprocess like this: when contents of ...
Read more >SVELTE KIT TUTORIAL #4 - Adding SCSS - YouTube
In this video we discuss how to add SCSS to a SvelteKit project. https://www.barrymichaeldoyle.com Like Subscribe Hit The Bell...
Read more >Hot Content Reload with SvelteKit & Contentful
Whenever an edit is made, e.g. editing a field or adding a page, we instruct the dev server to let the client-side know...
Read more >Configuration • Docs • SvelteKit
Your project's configuration lives in a svelte.config.js file at the root of your project. ... import adapter from '@sveltejs/adapter-auto';.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got it working by importing the
svelte-preprocess
in thesvelte.config.cjs
file and using it like this:Svelte-Kit now use vite.js for packing, how to use scss config in vite.js?