问题描述:
将本地node项目部署到其他node环境中时,提示错误
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin
解决方法:
在 webpack.dev.conf.js
中添加 extract-text-webpack-plugin
配置
const ExtractTextPlugin = require('extract-text-webpack-plugin')
plugins: [
.............
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
allChunks: false,
}),
]
重新 npm run dev
就成功运行了