cyl/dev
parent
3479b4e51e
commit
f3b717af1f
@ -1,4 +1,16 @@
|
|||||||
|
let plugins = [];
|
||||||
|
// production
|
||||||
|
if (process.env.NODE_ENV === "production") {
|
||||||
|
plugins = ["transform-remove-console"];
|
||||||
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ["@vue/cli-plugin-babel/preset"],
|
presets: ["@vue/cli-plugin-babel/preset"],
|
||||||
|
plugins: [
|
||||||
|
// [
|
||||||
|
// "import",
|
||||||
|
// { libraryName: "ant-design-vue", libraryDirectory: "es", style: true },
|
||||||
|
// ],
|
||||||
|
...plugins,
|
||||||
|
],
|
||||||
// publicPath: "./",
|
// publicPath: "./",
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extensions: [".AMap"],
|
|
||||||
};
|
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
const path = require("path");
|
||||||
|
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: {
|
||||||
|
entry1: "./src/entry/entry1.js",
|
||||||
|
entry2: "./src/entry/entry2.js",
|
||||||
|
},
|
||||||
|
plugins: [new CleanWebpackPlugin()],
|
||||||
|
output: {
|
||||||
|
filename: "[name].bundle.js",
|
||||||
|
path: path.resolve(__dirname, "dist"),
|
||||||
|
},
|
||||||
|
optimization: {
|
||||||
|
splitChunks: {
|
||||||
|
chunks: "initial",
|
||||||
|
minSize: 1,
|
||||||
|
maxSize: 0,
|
||||||
|
cacheGroups: {
|
||||||
|
vendors: {
|
||||||
|
test: /[\\/]node_modules[\\/]/,
|
||||||
|
priority: -10,
|
||||||
|
},
|
||||||
|
default: {
|
||||||
|
minChunks: 1,
|
||||||
|
priority: -20,
|
||||||
|
reuseExistingChunk: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// default config
|
||||||
|
// optimization: {
|
||||||
|
// splitChunks: {
|
||||||
|
// chunks: 'async',
|
||||||
|
// minSize: 30000,
|
||||||
|
// minChunks: 1,
|
||||||
|
// maxAsyncRequests: 5,
|
||||||
|
// maxInitialRequests: 3,
|
||||||
|
// automaticNameDelimiter: '~',
|
||||||
|
// automaticNameMaxLength: 30,
|
||||||
|
// name: true,
|
||||||
|
// cacheGroups: {
|
||||||
|
// vendors: {
|
||||||
|
// test: /[\\/]node_modules[\\/]/,
|
||||||
|
// priority: -10
|
||||||
|
// },
|
||||||
|
// default: {
|
||||||
|
// minChunks: 2,
|
||||||
|
// priority: -20,
|
||||||
|
// reuseExistingChunk: true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue