按需引用 wind
中的组件
npm i -D babel-plugin-wind
{
"plugins": [
"babel-plugin-wind"
]
}
Webpack
module.exports = {
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
plugins: [
'babel-plugin-wind'
]
}
}
}
]
}
}