We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59357d3 commit c7c7d46Copy full SHA for c7c7d46
scripts/build.js
@@ -34,15 +34,16 @@ async function build(opts) {
34
35
build({
36
format: 'esm',
37
- // bundle: true,
38
- // splitting: true,
39
- // chunkNames: '__chunks/[name]-[hash]',
40
});
41
42
43
format: 'cjs',
44
bundle: true,
45
outExtension: { '.js': '.cjs' },
+ footer: {
+ // Fix `export default {}` assigned to `module.exports.default`
+ js: 'if (module.exports.default) module.exports = module.exports.default;'
46
+ },
47
plugins: [
48
// @see https://github.com/evanw/esbuild/issues/622#issuecomment-769462611
49
{
0 commit comments