File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,16 @@ module.exports = {
187
187
] ,
188
188
include : paths . appSrc ,
189
189
} ,
190
+ {
191
+ // `mjs` support is still in its infancy in the ecosystem, so we don't
192
+ // support it.
193
+ // Modules who define their `browser` or `module` key as `mjs` force
194
+ // the use of this extension, so we need to tell webpack to fall back
195
+ // to auto mode (ES Module interop, allows ESM to import CommonJS).
196
+ test : / \. m j s $ / ,
197
+ include : / n o d e _ m o d u l e s / ,
198
+ type : 'javascript/auto' ,
199
+ } ,
190
200
{
191
201
// "oneOf" will traverse all following loaders until one will
192
202
// match the requirements. When no loader matches it will fall
Original file line number Diff line number Diff line change @@ -244,6 +244,16 @@ module.exports = {
244
244
] ,
245
245
include : paths . appSrc ,
246
246
} ,
247
+ {
248
+ // `mjs` support is still in its infancy in the ecosystem, so we don't
249
+ // support it.
250
+ // Modules who define their `browser` or `module` key as `mjs` force
251
+ // the use of this extension, so we need to tell webpack to fall back
252
+ // to auto mode (ES Module interop, allows ESM to import CommonJS).
253
+ test : / \. m j s $ / ,
254
+ include : / n o d e _ m o d u l e s / ,
255
+ type : 'javascript/auto' ,
256
+ } ,
247
257
{
248
258
// "oneOf" will traverse all following loaders until one will
249
259
// match the requirements. When no loader matches it will fall
You can’t perform that action at this time.
0 commit comments