1
0
Fork 0
freesewing/sites/org/plugins/esm.mjs

29 lines
598 B
JavaScript
Raw Permalink Normal View History

2025-04-21 18:20:52 +02:00
export function esmPlugin() {
return {
name: 'esm-plugin',
configureWebpack() {
return {
module: {
rules: [
{
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto',
},
{
test: /\.mjs$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-react'],
},
},
},
],
},
}
},
}
}