Pārlūkot izejas kodu

fix bundling issues

Adam Shaw 3 gadi atpakaļ
vecāks
revīzija
4ceccf44c8

+ 1 - 2
scripts/src/pkg/utils/bundle-struct.ts

@@ -273,12 +273,11 @@ export function computeOwnIifeExternalPaths(
 ): string[] {
   const { entryConfigMap, entryStructMap, iifeGlobalsMap } = pkgBundleStruct
 
-  // filter for entries that have iife (and iife global)
+  // filter for entries that have an iife global (even if a dedicated iife file is not generated)
   // and don't externalize current
   const iifeEntryStructMap = filterProps(entryStructMap, (entryStruct) => {
     return Boolean(
       entryStruct.entryGlob !== currentEntryStruct.entryGlob &&
-      entryConfigMap[entryStruct.entryGlob].iife &&
       iifeGlobalsMap[entryStruct.entryGlob],
     )
   })

+ 1 - 0
scripts/src/pkg/utils/rollup-presets.ts

@@ -182,6 +182,7 @@ function buildDtsOutputOptions(pkgBundleStruct: PkgBundleStruct): OutputOptions
     format: 'esm',
     dir: joinPaths(pkgBundleStruct.pkgDir, 'dist'),
     entryFileNames: '[name].d.ts',
+    chunkFileNames: 'internal-[hash].d.ts',
   }
 }