babel-plugin-transform-remove-imports
Modular import plugin for babel for kkt-ssr server-side rendering.
Usage
npm install babel-plugin-transform-remove-imports --save-dev
Via .babelrc
or babel-loader
.
{
"plugins": [
[
"babel-plugin-transform-remove-imports", {
"test": "(less|css)$"
}
]
]
}
import './index.less';
import './index.main.less';
import { Button } from 'uiw';
import { Select } from '@uiw/core';
import { Button } from 'uiw';
import { Select } from '@uiw/core';
Output Result
- import './index.less';
- import './index.main.less';
import { Button } from 'uiw';
import { Select } from '@uiw/core';