-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.demo.js
78 lines (77 loc) · 1.89 KB
/
webpack.config.demo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
const CopyPlugin = require("copy-webpack-plugin");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const path = require("path");
module.exports = {
mode: "production",
entry: {
bundle: [path.resolve(__dirname, "index.js")],
},
output: {
path: path.resolve(__dirname, "demo"),
filename: "bundle.js",
library: "bpmnModeler",
libraryTarget: "var",
libraryExport: "default",
},
plugins: [
new CopyPlugin({
patterns: [
{
from: path.resolve(__dirname, "demo.html"),
to: "./index.html",
},
{
from: path.resolve(__dirname, "assets/css/flows4apex.modeler.css"),
to: "assets/css/flows4apex.modeler.css",
},
{
from: path.resolve(__dirname, "node_modules/bpmn-js/dist/assets"),
to: "assets/bpmn-js",
},
{
from: path.resolve(__dirname, "node_modules/bpmn-js-color-picker/colors/color-picker.css"),
to: "assets/bpmn-js-color-picker/colors",
},
{
from: path.resolve(__dirname, "node_modules/@bpmn-io/properties-panel/dist/assets"),
to: "assets/bpmn-js-properties-panel",
},
{
from: path.resolve(
__dirname,
"node_modules/bpmn-js-bpmnlint/dist/assets/css/bpmn-js-bpmnlint.css"
),
to: "assets/bpmn-js-bpmnlint",
},
],
}),
new MonacoWebpackPlugin({
languages: ["sql", "json", "html"],
}),
],
devtool: "source-map",
devServer: {
compress: true,
port: 8082,
},
module: {
rules: [
{
test: /\.bpmnlintrc$/,
use: [
{
loader: "bpmnlint-loader",
},
],
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
{
test: /\.ttf$/,
use: ["file-loader"],
},
],
},
};