51 lines
1.2 KiB
JavaScript
51 lines
1.2 KiB
JavaScript
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
bundle: ['./app/app.js']
|
|
},
|
|
output: {
|
|
path: __dirname + '/public',
|
|
filename: 'app.js'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
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'
|
|
} ]
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.bpmn$/,
|
|
use: 'raw-loader'
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{ from: 'assets/**', to: 'vendor/bpmn-js', context: 'node_modules/bpmn-js/dist/' },
|
|
{ from: '*.css', to: 'vendor/bpmn-js-color-picker', context: 'node_modules/bpmn-js-color-picker/colors' },
|
|
{
|
|
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'
|
|
};
|