2022-06-07 14:16:49 -04:00
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
|
2022-09-22 10:36:00 -04:00
|
|
|
const myModule = {
|
|
|
|
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',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
const myPlugins = [
|
|
|
|
new CopyWebpackPlugin({
|
|
|
|
patterns: [
|
2022-06-15 09:51:46 -04:00
|
|
|
{
|
2022-09-22 10:36:00 -04:00
|
|
|
from: 'assets/**',
|
|
|
|
to: 'vendor/bpmn-js',
|
|
|
|
context: 'node_modules/bpmn-js/dist/',
|
2022-06-15 09:51:46 -04:00
|
|
|
},
|
2022-06-07 14:16:49 -04:00
|
|
|
{
|
2022-09-22 10:36:00 -04:00
|
|
|
from: 'assets/**',
|
|
|
|
to: 'vendor/bpmn-js-properties-panel',
|
|
|
|
context: 'node_modules/bpmn-js-properties-panel/dist/',
|
|
|
|
},
|
|
|
|
{ from: '**/*.{html,css}', context: 'app/' },
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
];
|
|
|
|
|
|
|
|
module.exports = [
|
|
|
|
{
|
|
|
|
entry: {
|
|
|
|
bundle: ['./app/spiffworkflow'],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: `${__dirname}/dist`,
|
|
|
|
filename: 'bpmn_spiffworkflow.js',
|
|
|
|
},
|
|
|
|
module: myModule,
|
|
|
|
mode: 'development',
|
|
|
|
devtool: 'source-map',
|
2022-06-07 14:16:49 -04:00
|
|
|
},
|
2022-09-22 10:36:00 -04:00
|
|
|
{
|
|
|
|
entry: {
|
|
|
|
bundle: ['./app/app.js'],
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
path: `${__dirname}/public`,
|
|
|
|
filename: 'app.js',
|
|
|
|
},
|
|
|
|
module: myModule,
|
|
|
|
plugins: myPlugins,
|
|
|
|
mode: 'development',
|
|
|
|
devtool: 'source-map',
|
|
|
|
},
|
|
|
|
];
|