Nucleic Photon Magnetizer

    babel-plugin-suppress-css-modules

    1.0.1 • Public • Published

    Suppress css modules while import/require css/less/sass modules in js file.

    Install

    npm install --save-dev babel-plugin-suppress-css-modules

    Usage

    configure .babelrc file

    {
      "env": {
        "server": {
          "plugins": [
            ["suppress-css-modules", { 
                extensions: [".css", ".less", ".scss"] /*default: ".css", ".less", ".scss"*/ 
            }]
          ]
        }
      }
    }

    source file src.js

    import "./css.css";
    import "./less.less";
    import "./scss.scss";
     
    const k = (x) => {};
    function xx() {}
     
    xx();
    k("x");
     
    require("./css1.css");
    const x = require("./less1.less");

    output file output.js

    "use strict";
     
    var k = function k(x) {};
    function xx() {}
     
    xx();
    k("x");

    Install

    npm i babel-plugin-suppress-css-modules

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • junhua