Prechádzať zdrojové kódy

fix(api): export commonjs chunks with `.cjs` extension, fix #1625 (#1627)

Amr Bashir 4 rokov pred
rodič
commit
ddcd9233bd

+ 5 - 0
.changes/api-cjs-chunks.md

@@ -0,0 +1,5 @@
+---
+"api": patch
+---
+
+CommonJS chunks are now properly exported with `.cjs` extension

+ 1 - 0
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: {}
       },