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: [ "@antv/data-set", "@antv/f2", "axios", "vant", "vue", "vue-axios", "vue-router", "vuex", ], }, 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"), }), ], };