webpack4 sets mode mode to none prompt does not set mode to development
use DLL to package vue in the vue project to avoid re-build the third-party library every time it is packaged, and an error will be reported when executing the script. Webpack prompt that mode is not set to development by default, resulting in that the path of entry is not the set vendor. Although the package is successful, there will be one more entry file in development
.related codes
webpack.dll.conf.js related code
const dllWebpackConf = {
entry: {
vendor: ["vue/dist/vue.esm.js"]
},
output: {
filename: "[name].dll.js",
path: path.resolve(__dirname, "../dist/dll"),
library: "[name]"
},
plugins: [
new Webpack.DllPlugin({
path: path.join(__dirname, "../dist/dll", "[name]-manifest.json"),
name: "[name]"
})
]
}
execute the script
webpack-mode=none-- config build/webpack.dll.conf.js
WARNING in configuration
The "mode" option has not been set, webpack will fallback to" production" for this value. Set "mode" option to" development" or "production"
to enable defaults for each environment.