Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@kazzkiq/svelte-preprocess-scss

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kazzkiq/svelte-preprocess-scss

Svelte preprocessor for scss

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

svelte-preprocess-sass

Svelte preprocessor for scss (SASS)

Installation

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

Usage

Using rollup-plugin-svelte

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

export default {
  ...
  plugins: [
    ...
    svelte({
      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.:

...
scss({
  plugins: [
    ...
  ]
})

Filtering styles

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

...
sass(
  {} // Empty sass options
  { all: true } // Preprocess all styles
)

For available options visit the sass documentation.

Keywords

svelte

FAQs

Package last updated on 14 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts