Every second saved in the team development process is a valuable thing

The following is my Vue CLI3 Dll configuration (please contact if there is any problem)

/ * * @ Description: Dll configuration information * @ Author: wen-zhou wu * @ making: https://github.com/fodelf * @ the Date: 2019-10-16 09:53:49 */ const path = require('path')
const webpack = require('webpack')
const CleanWebpackPlugin = require('clean-webpack-plugin'// DLL file directory const dllPath ='public/vendor'Module. exports = {entry: {// Vendor: ['vue'.'vue-router'.'vuex'.'axios'.'element-ui']
  },
  output: {
    path: path.join(__dirname, dllPath),
    filename: '[name].dll.js', // vendor.dl.js to expose the global variable name // keep the same name as webpack.dllplugin library:'[name]_[hash]'}, plugins: [// New CleanWebpackPlugin(['*. *'], {root: path.join(__dirname, dllPath)}), // Set the environment variable new webpack.defineplugin ({'process.env': {
        NODE_ENV: 'production'}}), // manifest.json describes what the dynamic link library contains. New webpack.dllplugin ({path: path.join(__dirname, dllPath,'[name]-manifest.json'), // keep the same name as output.library'[name]_[hash]',
      context: process.cwd()
    })
  ]
}Copy the code