simplify code
This commit is contained in:
parent
df5e118da4
commit
8d5ad83b32
|
@ -359,10 +359,9 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
|
||||||
this._id !== "default"
|
this._id !== "default"
|
||||||
) {
|
) {
|
||||||
// In strict harmony modules we only support the default export
|
// In strict harmony modules we only support the default export
|
||||||
const exportName = `the named export '${this._id}'`;
|
|
||||||
return [
|
return [
|
||||||
new HarmonyLinkingError(
|
new HarmonyLinkingError(
|
||||||
`Can't reexport ${exportName} from non EcmaScript module (only default export is available)`
|
`Can't reexport the named export '${this._id}' from non EcmaScript module (only default export is available)`
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,10 +84,9 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
|
||||||
this._id !== "default"
|
this._id !== "default"
|
||||||
) {
|
) {
|
||||||
// In strict harmony modules we only support the default export
|
// In strict harmony modules we only support the default export
|
||||||
const exportName = `the named export '${this._id}'`;
|
|
||||||
return [
|
return [
|
||||||
new HarmonyLinkingError(
|
new HarmonyLinkingError(
|
||||||
`Can't import ${exportName} from non EcmaScript module (only default export is available)`
|
`Can't import the named export '${this._id}' from non EcmaScript module (only default export is available)`
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue