Webpack4 mode mode cannot set none

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.

The dll in the

dist directory stores the packaged vue file with an additional main.js to figure out why none cannot be set.

Jun.28,2022

there are only development and production , but there is no none this option


whether this has been solved or not,
vue-cli2 webpack4 set "dll":
"webpack-- mode none-- config. / build/webpack.dll.config.js",
report directly: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead. Could you tell me how to solve it?


A none that can be set means that there is no default value

 mode: "production", // "production" | "development" | "none"
  mode: "production", // enable many optimizations for production builds
  mode: "development", // enabled useful tools for development
  mode: "none", // no defaults
  // Chosen mode tells webpack to use its built-in optimizations accordingly.
https://www.webpackjs.com/con...

this is the dll configuration information I used in react for reference

const path = require('path');
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');

const vendors = [
  'antd',
  'axios',
  'nprogress',
  'react',
  'react-dom',
  'react-loadable',
  'react-redux',
  'react-router',
  'react-router-dom',
  'redux'
];

module.exports = {
  entry: {
    vendor: vendors
  },
  output: {
    path: path.resolve(__dirname, '../dll'),
    filename: 'Dll.js',
    library: '[name]_[hash]'
  },
  plugins: [
    new webpack.DllPlugin({
      path: path.resolve(__dirname, '../dll', 'manifest.json'),
      name: '[name]_[hash]',
      context: __dirname
    }),
    new CleanWebpackPlugin(['../dll'], { allowExternal: true })
  ]
};
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ea95cd-1f4d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ea95cd-1f4d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?