Skip to content

Commit

Permalink
Disable hoistTransitiveImports (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi authored Dec 20, 2023
1 parent 9a9d6af commit 166833e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/build-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ function buildOutputConfigs(
sourcemap: options.sourcemap,
manualChunks: splitChunks,
chunkFileNames: '[name]-[hash].js',
// By default in rollup, when creating multiple chunks, transitive imports of entry chunks
// will be added as empty imports to the entry chunks. Disable to avoid imports hoist outside of boundaries
hoistTransitiveImports: false,
entryFileNames: basename(outputFile),
}
}
Expand Down

0 comments on commit 166833e

Please sign in to comment.