diff --git a/packages/pack/src/actions/main.ts b/packages/pack/src/actions/main.ts index 1ec3323..4c2a951 100644 --- a/packages/pack/src/actions/main.ts +++ b/packages/pack/src/actions/main.ts @@ -89,7 +89,7 @@ module.exports = async function action(specifiedEntries: string[], options: any } }) } - if (eachOptions.bundle && options.forceIifeBundle) { + if (eachOptions.format === 'iife' && eachOptions.bundle && options.forceIifeBundle) { external = [] } const eachOutdir = eachOptions.outdir || options.outdir