build-plugin-ignore-style
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

build-plugin-ignore-style

ignore style of component with modular imported by babel-plugin-import

Example

{
  "plugins": ["build-plugin-ignore-style", {
    "libraryName": "@alifd/next"
  }]
}

style imported below will not been compiled

import '@alifd/next/lib/button/style';
import '@alifd/next/lib/button/style.js';
import '@alifd/next/lib/button/style/index.js';
import '@alifd/next/es/button/style';
import '@alifd/next/es/button/style.js';
import '@alifd/next/es/button/style/index.js';

config multi library

{
  "plugins": ["build-plugin-ignore-style", [
    {
      "libraryName": "@alifd/next",
      "style": "style2"
    },
    {
      "libraryName": "antd"
    }
  ]]
}

config custom style regexp

{
  "plugins": ["build-plugin-ignore-style", [
    {
      "rule": "@alifd/next/.*\\.scss"
    },
  ]]
}

Dependents (2)

Package Sidebar

Install

npm i build-plugin-ignore-style

Weekly Downloads

91

Version

0.1.2

License

MIT

Unpacked Size

4.29 kB

Total Files

7

Last publish

Collaborators

  • clarkxia
  • rax-publisher