Merge pull request #20040 from backstage/freben/naming

use named exports in cjs builds
This commit is contained in:
Fredrik Adelöw
2023-09-20 15:04:35 +02:00
committed by GitHub
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Explicitly set `exports: 'named'` for CJS builds, ensuring that they have e.g. `exports["default"] = catalogPlugin;`
+1
View File
@@ -90,6 +90,7 @@ export async function makeRollupConfigs(
chunkFileNames: `cjs/[name]-[hash].cjs.js`,
format: 'commonjs',
sourcemap: true,
exports: 'named',
});
}
if (options.outputs.has(Output.esm)) {