2022-06-14 21:00:08 +00:00
|
|
|
module.exports = {
|
2022-06-15 17:52:00 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
2022-07-05 15:50:55 +00:00
|
|
|
test: /\.m?[jt]sx?$/,
|
2022-06-15 17:52:00 +00:00
|
|
|
exclude: /node_modules/,
|
|
|
|
use: {
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
plugins: [
|
2022-06-27 19:14:51 +00:00
|
|
|
[
|
|
|
|
'@babel/plugin-transform-react-jsx',
|
|
|
|
{
|
|
|
|
pragma: 'h',
|
|
|
|
pragmaFrag: 'Fragment',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
'@babel/preset-react',
|
2022-07-05 15:50:55 +00:00
|
|
|
'@babel/plugin-transform-typescript',
|
2022-07-13 20:48:34 +00:00
|
|
|
{
|
|
|
|
importSource: '@bpmn-io/properties-panel/preact',
|
|
|
|
runtime: 'automatic',
|
|
|
|
},
|
2022-06-27 19:14:51 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-06-15 17:52:00 +00:00
|
|
|
},
|
2022-06-27 19:14:51 +00:00
|
|
|
],
|
2022-06-15 17:52:00 +00:00
|
|
|
},
|
|
|
|
webpack: {
|
|
|
|
configure: {
|
2022-06-27 19:14:51 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
inferno:
|
|
|
|
process.env.NODE_ENV !== 'production'
|
|
|
|
? 'inferno/dist/index.dev.esm.js'
|
|
|
|
: 'inferno/dist/index.esm.js',
|
|
|
|
react: 'preact/compat',
|
|
|
|
'react-dom/test-utils': 'preact/test-utils',
|
|
|
|
'react-dom': 'preact/compat', // Must be below test-utils
|
|
|
|
'react/jsx-runtime': 'preact/jsx-runtime',
|
2022-06-15 17:52:00 +00:00
|
|
|
},
|
2022-06-27 19:14:51 +00:00
|
|
|
},
|
|
|
|
},
|
2022-06-15 17:52:00 +00:00
|
|
|
},
|
|
|
|
babel: {
|
2022-06-27 19:14:51 +00:00
|
|
|
presets: [
|
|
|
|
'@babel/preset-env',
|
|
|
|
['@babel/preset-react', { runtime: 'automatic' }],
|
2022-07-05 15:50:55 +00:00
|
|
|
'@babel/preset-typescript',
|
2022-06-27 19:14:51 +00:00
|
|
|
],
|
2022-06-15 17:52:00 +00:00
|
|
|
// plugins: [],
|
2022-06-27 19:14:51 +00:00
|
|
|
loaderOptions: (babelLoaderOptions) => {
|
2022-06-15 17:52:00 +00:00
|
|
|
return babelLoaderOptions;
|
|
|
|
},
|
|
|
|
},
|
2022-06-27 19:14:51 +00:00
|
|
|
};
|