Skip to content

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

Notifications You must be signed in to change notification settings

jBox/babel-plugin-suppress-css-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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");

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published