Skip to content

Commit e4cccc2

Browse files
committed
Fix CJS files being incorrectly transformed to ESM
This commit fixes a recurring bug where some packages were being transpiled from CJS to ESM, resulting in exports sometimes being incorrectly transformed (i.e. js-cookie, mapbox-gl).
1 parent ff7c46f commit e4cccc2

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

packages/webpack-config/src/webpack.base.config.js

-3
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,12 @@ export default async function getWebpackBaseConfig(config, { mode = 'production'
8787
},
8888
{
8989
test: /\.m?(j|t)s$/,
90-
// Exclude all but packages from the `@studiometa/` namespace
91-
exclude: [/node_modules[\\/](?!@studiometa[\\/]).*/],
9290
type: 'javascript/auto',
9391
use: {
9492
loader: 'esbuild-loader',
9593
options: {
9694
loader: 'ts',
9795
target: isDev ? 'es2022' : 'es2020',
98-
format: 'esm',
9996
},
10097
},
10198
},

0 commit comments

Comments
 (0)