适用于开发 https://m.v.qq.com/txi/dev/ 组件的 babel plugin。
npm install @chenng/babel-plugin-ivcomponent -D
// webpack.config.js
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
plugins: ['@chenng/babel-plugin-ivcomponent'], // 配置插件
presets: ['@babel/preset-env'],
}
}
}
]
# 开发
comp="Bubble" npm run dev
# 打包
comp="Bubble" npm run build