Skip to content

rollup plugin for loading sass/scss variables as javascript object

Notifications You must be signed in to change notification settings

gmfun/rollup-plugin-sass-variables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rollup-plugin-sass-variables

Rollup plugin for loading sass/scss variables as javascript object

Software License Issues JavaScript Style Guide NPM

Installation

npm install rollup-plugin-sass-variables -D
// or
yarn add rollup-plugin-sass-variables --dev

Usage

Call the pluglin inside plugins array

import scssVariable from 'rollup-plugin-sass-variables'

export default {
  ...
  plugings: [
    ...
    scssVariable()
  ]
}

Import .scss or .sass file like any of the following

import variables from 'variables!../../styles/colors.scss'

import variables from 'sass-variable-loader!../../styles/colors.scss'

import variables from '!!sass-variable-loader!../../styles/colors.scss'

import variables from '!!sass-variable-loader?preserveVariableNames!../../styles/colors.scss'

About

rollup plugin for loading sass/scss variables as javascript object

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published