tweak SWC options to allow module interop

This commit is contained in:
Johannes 2024-06-03 18:40:56 +02:00
parent 5012cb8fb8
commit b9b51f0fb0
No known key found for this signature in database
GPG key ID: 6DEF802A22264FCA
2 changed files with 4 additions and 4 deletions

View file

@ -305,7 +305,7 @@ class SwcTranspiler {
},
module: {
type: 'amd',
noInterop: true
noInterop: false
},
minify: false,
};
@ -313,7 +313,7 @@ class SwcTranspiler {
...this._swcrcAmd,
module: {
type: 'commonjs',
importInterop: 'none'
importInterop: 'swc'
}
};
static _swcrcEsm = {

View file

@ -388,7 +388,7 @@ export class SwcTranspiler implements ITranspiler {
},
module: {
type: 'amd',
noInterop: true
noInterop: false
},
minify: false,
};
@ -397,7 +397,7 @@ export class SwcTranspiler implements ITranspiler {
...this._swcrcAmd,
module: {
type: 'commonjs',
importInterop: 'none'
importInterop: 'swc'
}
};