Skip to content

Commit d2b268c

Browse files
authored
docs: add supported version for import & module-import externals (#7369)
1 parent f6b5f90 commit d2b268c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/configuration/externals.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,8 @@ Note that there will be an `import` statement in the output bundle.
479479

480480
### externalsType.import
481481

482+
<Badge text="5.94.0+" />
483+
482484
Specify the default type of externals as `'import'`. Webpack will generate code like `import('...')` for externals used in a module.
483485

484486
#### Example
@@ -524,6 +526,8 @@ Note that the output bundle will have an `import()` statement.
524526

525527
### externalsType.module-import
526528

529+
<Badge text="5.94.0+" />
530+
527531
Specify the default type of externals as `'module-import'`. This combines [`'module'`](#externalstypemodule) and [`'import'`](#externalstypeimport). Webpack will automatically detect the type of import syntax, setting it to `'module'` for static imports and `'import'` for dynamic imports.
528532

529533
Ensure to enable [`experiments.outputModule`](/configuration/experiments/#experimentsoutputmodule) first if static imports exist, otherwise, webpack will throw errors.

0 commit comments

Comments
 (0)