Skip to content

Commit

Permalink
simplify + capture all dynamic imports
Browse files Browse the repository at this point in the history
  • Loading branch information
zth committed Jun 24, 2022
1 parent c8c0f27 commit 2dc708c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions RescriptRelayVitePlugin.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,8 @@ export let rescriptRelayVitePlugin = ({
generateBundle(_, bundle) {
for (let file in bundle) {
let chunk = bundle[file];
if (chunk.type === "chunk" && chunk.facadeModuleId != null) {
let moduleName = path.basename(chunk.facadeModuleId).split(".")[0];
if (moduleName != null) {
manifest[moduleName] = chunk.fileName;
}
if (chunk.type === "chunk" && chunk.isDynamicEntry) {
manifest[chunk.name] = chunk.fileName;
}
}

Expand Down

0 comments on commit 2dc708c

Please sign in to comment.