Skip to content

Commit c783012

Browse files
committed
rebase
1 parent f22a965 commit c783012

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/ExternalModule.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,11 @@ class ExternalModule extends Module {
760760
if (!(/** @type {BuildInfo} */ (this.buildInfo).module)) {
761761
if (!runtimeTemplate.supportsDynamicImport()) {
762762
throw new Error(
763-
"The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script" +
764-
(runtimeTemplate.supportsEcmaScriptModuleSyntax()
763+
`The target environment doesn't support dynamic import() syntax so it's not possible to use external type 'module' within a script${
764+
runtimeTemplate.supportsEcmaScriptModuleSyntax()
765765
? "\nDid you mean to build a EcmaScript Module ('output.module: true')?"
766-
: "")
766+
: ""
767+
}`
767768
);
768769
}
769770
return getSourceForImportExternal(

types.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5349,6 +5349,7 @@ type IgnorePluginOptions =
53495349
type ImportAttributes = Record<string, string> & {};
53505350
declare interface ImportDependencyMeta {
53515351
attributes?: ImportAttributes;
5352+
externalType?: "import" | "module";
53525353
}
53535354
declare interface ImportModuleOptions {
53545355
/**

0 commit comments

Comments
 (0)