Skip to content

Changes to imported SCSS in style tag is not triggering a recompile / hot reload #72

Closed
@andymerskin

Description

@andymerskin

Hey there,

I feel like I'm missing something, but I have a pretty common use case where I'm importing a SCSS file into my component's <style>. The file is importing just fine and my changes in the imported SCSS are reflected whenever I save my Component.html file, but any changes to the .scss file I'm importing doesn't trigger a compile + reload or HMR.

<div class="thing"></div>

<style lang="text/scss">
  @import 'styles/pages/thing.scss';
</script>
  • Do I need to manually trigger a Svelte compile through sass-loader somehow? If so, does that even make sense when using svelte-loader?
  • Is there some magic I need to do in svelte-loader's preprocess.style option?
  • I should note that hotReload is also enabled, and emitCSS is only enabled for production, not when using webpack-dev-server.

Any suggestions? And please let me know if I can provide more information to help figure this one out. :) Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions