Naughty Pinching Mannequins
    Have ideas to improve npm?Join in the discussion! »

    react-rewire-sass

    1.1.11 • Public • Published

    react-rewire-sass

    Add css module for sass/scss file

    Usage

    • 默认使用:
    import { compose } from "react-rewired-scripts";
    import rewireSass from "react-rewire-sass";
     
    export default compose(rewireSass);
    • 可配置选项:
    import { compose } from "react-rewired-scripts";
    import rewireSass from "react-rewire-sass";
     
    export default compose(
        rewireSass.withOptions({
            // sass-loader 可配置的选项...
            // https://github.com/webpack-contrib/sass-loader
     
            // 额外选项cssModule配置选项
            localIdentName: "[local]___[hash:base64:5]",
            camelCase: true
        })
    );

    说明

    下面的扩展文件会启用cssModules模式

    • *.module.sass
    • *.module.css

    Keywords

    none

    Install

    npm i react-rewire-sass

    DownloadsWeekly Downloads

    22

    Version

    1.1.11

    License

    ISC

    Last publish

    Collaborators

    • avatar