Skip to content

chowa/babel-plugin-chowa-import

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-chowa-import

Chowa UI component library modular import plugin

npm npm

Install

npm install babel-plugin-chowa-import --save-dev

Usage

webpack

{
    rules: [
        {
            test: /\.js$/,
            use: {
                loader: 'babel-loader',
                options: {
                    presets: ['@babel/preset-env', '@babel/preset-react'],
                    plugins: [
                        ['chowa-import', { style: 'css' }]
                    ]
                }
            }
        }
    ]
}

babel

{
    "presets": [
        ["@babel/preset-env", {
            "targets": {
                "browsers": ["last 2 versions", "safari >= 7"]
            },
            "modules": false,
            "useBuiltIns": "usage"
        }],
        "@babel/preset-react"
    ],
    "plugins": [
        ["chowa-import", { style: 'scss' }]
    ]
}

options

{
    style?: 'css' | 'sass';
}

Releases

No releases published

Packages

No packages published