From ddcd9233bd6f499aa7f22484d6c151b01778bc1b Mon Sep 17 00:00:00 2001 From: Amr Bashir <48618675+amrbashir@users.noreply.github.com> Date: Mon, 26 Apr 2021 19:12:00 +0200 Subject: [PATCH] fix(api): export commonjs chunks with `.cjs` extension, fix #1625 (#1627) --- .changes/api-cjs-chunks.md | 5 +++++ tooling/api/rollup.config.js | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changes/api-cjs-chunks.md diff --git a/.changes/api-cjs-chunks.md b/.changes/api-cjs-chunks.md new file mode 100644 index 000000000..672e5b816 --- /dev/null +++ b/.changes/api-cjs-chunks.md @@ -0,0 +1,5 @@ +--- +"api": patch +--- + +CommonJS chunks are now properly exported with `.cjs` extension diff --git a/tooling/api/rollup.config.js b/tooling/api/rollup.config.js index 0790637ff..cc6c9665b 100644 --- a/tooling/api/rollup.config.js +++ b/tooling/api/rollup.config.js @@ -36,6 +36,7 @@ export default [ dir: 'dist/', entryFileNames: '[name].cjs', format: 'cjs', + chunkFileNames: '[name]-[hash].cjs', exports: 'named', globals: {} },