build the mpvue project according to http://mpvue.com/mpvue/-sharp_3. The error is as follows:
function generateLoaders (loader, loaderOptions) in unitls.js {
// var ExtractTextPlugin = require("extract-text-webpack-plugin")
var MiniCssExtractPlugin = require("mini-css-extract-plugin")
function generateLoaders (loader, loaderOptions) {
var loaders = [cssLoader, px2rpxLoader, postcssLoader]
if (loader) {
loaders.push({
loader: loader + "-loader",
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
// return ExtractTextPlugin.extract({
// use: loaders,
// fallback: "vue-style-loader"
// })
return [
MiniCssExtractPlugin.loader,
{
loader: "css-loader",
options: {
minimize: process.env.NODE_ENV === "production"
}
}
]
} else {
return ["vue-style-loader"].concat(loaders)
}
}
the modules that ps: depends on have been upgraded to the latest version. Trying to change ompiler.plugin to compiler.hooks.emit.tap, in dev-sever.js does not solve the problem