2022-06-07 18:16:49 +00:00
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
|
2022-09-23 18:32:25 +00:00
|
|
|
module.exports = {
|
|
|
|
entry: {
|
|
|
|
bundle: ['./app/app.js']
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: __dirname + '/public',
|
|
|
|
filename: 'app.js'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
2022-06-15 13:51:46 +00:00
|
|
|
{
|
2022-09-23 18:32:25 +00:00
|
|
|
test: /\.m?js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
plugins: [
|
|
|
|
[ '@babel/plugin-transform-react-jsx', {
|
|
|
|
'importSource': '@bpmn-io/properties-panel/preact',
|
|
|
|
'runtime': 'automatic'
|
|
|
|
} ]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2022-06-15 13:51:46 +00:00
|
|
|
},
|
2022-06-07 18:16:49 +00:00
|
|
|
{
|
2022-09-23 18:32:25 +00:00
|
|
|
test: /\.bpmn$/,
|
|
|
|
use: 'raw-loader'
|
|
|
|
}
|
|
|
|
]
|
2022-09-22 14:36:00 +00:00
|
|
|
},
|
2022-09-23 18:32:25 +00:00
|
|
|
plugins: [
|
|
|
|
new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
|
|
|
{ from: 'assets/**', to: 'vendor/bpmn-js', context: 'node_modules/bpmn-js/dist/' },
|
|
|
|
{
|
|
|
|
from: 'assets/**',
|
|
|
|
to: 'vendor/bpmn-js-properties-panel',
|
|
|
|
context: 'node_modules/bpmn-js-properties-panel/dist/'
|
|
|
|
},
|
|
|
|
{from: '**/*.{html,css}', context: 'app/'}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
],
|
|
|
|
mode: 'development',
|
|
|
|
devtool: 'source-map'
|
|
|
|
};
|