Skip to content
Svelte preprocessor for sass
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead, 79 commits behind ls-age:master.
Latest commit fbeb78f Jun 14, 2018


Svelte preprocessor for scss (SASS)


npm install --save-dev @kazzkiq/svelte-preprocess-scss node-sass


Using rollup-plugin-svelte

// rollup.config.js
import svelte from 'rollup-plugin-svelte';
import { scss } from '@kazzkiq/svelte-preprocess-scss';

export default {
  plugins: [
      preprocess: {
        style: scss(),

Now all <style> elements in your components that have a type="text/scss" or lang="scss" attribute will be preprocessed by sass.

Passing options to sass

The scss function passes the first argument to the sass compiler, e.g.:

  plugins: [

Filtering styles

The scss function passes the second argument to svelte-preprocess-filter, e.g.:

  {} // Empty sass options
  { all: true } // Preprocess all styles

For available options visit the sass documentation.

You can’t perform that action at this time.