use named exports in cjs builds

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-09-20 14:16:40 +02:00
parent 4ec6ffb4d5
commit 3ef18f8c06
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)) {