const path = require("path"); const webpack = require("webpack"); const terserWebpackPlugin = require("terser-webpack-plugin"); const {CleanWebpackPlugin} = require('clean-webpack-plugin') module.exports = { mode: "production", entry: { vue: [ "axios", "core-js", "echarts", "echarts-wordcloud", "element-plus", "js-sha256", "vue", "vue-router" ], }, output: { path: path.resolve(__dirname, "dll"), filename: "dll_[name].js", library: "dll_[name]", }, optimization: { minimizer: [ new terserWebpackPlugin({ extractComments: false, }), ], }, plugins: [ new CleanWebpackPlugin({ path: path.join(__dirname, "./dll") }), new webpack.DllPlugin({ name: "dll+[name]", path: path.resolve(__dirname, "./dll/[name].manifest.json"), }), ], };