babel-plugin-component-scss

Modular build plugin for babel.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
babel-plugin-component-scss
443431.1.25 years ago5 years agoMinified + gzip package size for babel-plugin-component-scss in KB

Readme

babel-plugin-component-scss
NPM VERSION

Install

npm install babel-plugin-component-scss -D
or
yarn add babel-plugin-component-scss --dev

Example

Converts
import { Button } from 'element-ui'

to
var button = require('element-ui/lib/button')
require('element-ui/packages/theme-chunk/button.scss')

Usage

Via .babelrc or babel-loader.
{
  "plugins": [["component-scss", options]]
}

Multiple Module

{
  "plugins": [
    ["component-scss", {
       "libraryName": "element-ui",
       "styleLibraryName": "theme-chalk/src",
       "ext":".scss"
     }]
  ]
}