bpmn-process-designer
Version:
A process designer base on Vue 2.x and ElementUI
37 lines (31 loc) • 828 B
JavaScript
const TerserPlugin = require("terser-webpack-plugin");
const IS_PROD = process.env.NODE_ENV === "production";
const cdn = {
externals: {
vue: "Vue",
"element-ui": "ELEMENT",
"bpmn-js/lib/Modeler": "BpmnJS"
},
css: [],
js: [
"https://unpkg.com/bpmn-js@8.2.2/dist/bpmn-modeler.development.js",
"https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js",
"https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.0/index.min.js"
]
};
module.exports = {
publicPath: IS_PROD ? "././" : "/", // 打包相对路径
productionSourceMap: false,
devServer: {
port: 8100
},
/* configureWebpack: config => {
// 生产环境相关配置
if (IS_PROD) {
// cdn
config.externals = cdn.externals;
// 代码混淆
config.plugins.push(new TerserPlugin());
}
}*/
};