mirror of
https://github.com/sartography/spiffworkflow-frontend.git
synced 2025-02-23 19:58:25 +00:00
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
module.exports = {
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.m?js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
plugins: [
|
|
[ "@babel/plugin-transform-react-jsx", {
|
|
"pragma": "h",
|
|
"pragmaFrag": "Fragment",
|
|
} ],
|
|
"@babel/preset-react"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
]
|
|
},
|
|
webpack: {
|
|
configure: {
|
|
"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"
|
|
},
|
|
}
|
|
}
|
|
},
|
|
babel: {
|
|
"presets": [
|
|
"@babel/preset-env",
|
|
["@babel/preset-react", {"runtime": "automatic"}]
|
|
],
|
|
// plugins: [],
|
|
loaderOptions: (babelLoaderOptions, { env, paths }) => {
|
|
return babelLoaderOptions;
|
|
},
|
|
},
|
|
}
|