Skip to content

Commit 121761d

Browse files
Update src/content/docs/workers/wrangler/bundling.mdx
Co-authored-by: Greg Brimble <[email protected]>
1 parent c168000 commit 121761d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/workers/wrangler/bundling.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ This approach is useful for supporting lazy loading of large or dynamically impo
6161

6262
- Normally, a large lazy-imported file (for example, `await import("./large-dep.mjs")`) would be bundled directly into your entrypoint, reducing the effectiveness of the lazy loading.
6363
If a matching rule is added to `rules`, then this file would only be loaded and executed in the runtime when it is actually imported.
64-
- Previously, variable based dynamic imports (for example, ``await import(`./lang/${language}.mjs`)``) would always fail at runtime because Wrangler had no way of knowing which modules to include in the upload.
64+
- Without `find_additional_modules`, variable-based dynamic imports (for example, ``await import(`./lang/${language}.mjs`)``) would always fail at runtime because Wrangler had no way of knowing which modules to include in the upload.
6565
Providing a rule that matches all these files, such as { type = "ESModule", globs = ["./land/**/*.mjs"], fallthrough = true }, will ensure this module is available at runtime.
6666
- "Partial bundling" is supported when `find_additional_modules` is `true`, and a source file matches one of the configured `rules`, since Wrangler will then treat it as "external" and not try to bundle it into the entry-point file.
6767

0 commit comments

Comments
 (0)