npm i comment-require-loader --save-dev
webpack.config.js
module.exports = {
module: {
loaders: [
{
test: /\.js$/,
loaders: ['comment-require-loader'],
include: [path.resolve(__dirname, 'node_modules/imui')]
}
]
}
};
org file
// @require '../style/index.css'
output file
require('../style/index.css');
实际是这个插件用于在 webpack 构建环境里兼容使用 fis3 输出的带有// @require '***'
的文件