-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.js
39 lines (35 loc) · 989 Bytes
/
webpack.config.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
/* eslint-env node */
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const mode = process.env.NODE_ENV || 'development';
module.exports = {
mode,
entry: './example/app.js',
output: {
path: path.join(__dirname, 'public'),
filename: 'app.js',
},
module: {
rules: [
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
},
{
test: /\.bpmn$/,
type: 'asset/source'
}
]
},
plugins: [
new CopyPlugin({
patterns: [
{ from: '*.html', context: 'example', to: '.' },
{ from: 'bpmn-js/dist/assets/**/*', context: 'node_modules', to: './vendor' },
{ from: '@bpmn-io/properties-panel/dist/assets/**/*', context: 'node_modules', to: './vendor' },
{ from: 'bpmn-js-element-templates/dist/assets/**/*', context: 'node_modules', to: './vendor' }
],
}),
],
devtool: mode === 'development' ? 'eval-source-map' : 'source-map'
};