加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.prod.js 851 Bytes
一键复制 编辑 原始数据 按行查看 历史
fyl080801 提交于 2020-07-09 20:44 . feat: 今天不搞了
const path = require("path");
const { merge } = require("webpack-merge");
const nodeExternals = require("webpack-node-externals");
const common = require("./webpack.config.common");
const production = {
entry: {
vjdesign: path.resolve(__dirname, "./package/index.js")
},
devtool: "source-map",
mode: "production",
optimization: {
minimize: true
}
};
module.exports = [
merge(common, production, {
output: {
path: path.resolve(__dirname, "./dist"),
filename: "[name].umd.js",
libraryTarget: "umd",
library: "VueJsonDesign",
umdNamedDefine: true
}
}),
merge(common, production, {
externals: [nodeExternals()],
output: {
path: path.resolve(__dirname, "./dist"),
filename: "[name].esm.js",
libraryTarget: "commonjs2",
library: "VueJsonDesign"
}
})
];
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化