@jomsou/babel-import-plugin
v1.0.0-master.1632949
Published
This is a project about babel plugin
Downloads
6
Readme
babel-import-plugin
安装
npm i @jomsou/babel-import-plugin -D
使用
babel.config.js配置
const importPlugin = require('@jomsou/babel-import-plugin')
module.exports = {
"plugins": [
importPlugin
// new importPlugin()
]
}
webpack配置
const importPlugin = require('@jomsou/babel-import-plugin')
rules: [
{
test: /\.js$/, use: {
loader: 'babel-loader',
options: {
presets: [
'env',
'react'
],
plugins: [
importPlugin
// new importPlugin()
]
}
}, exclude: /node_modules/}
]
}
前:
后:
更新日志:
- 2020.11.10 完成v1.1.0并加入github actions
- 2018.10.08 v1.0.0版本