simplify code

This commit is contained in:
Tobias Koppers 2019-05-20 09:45:56 +02:00
parent df5e118da4
commit 8d5ad83b32
2 changed files with 2 additions and 4 deletions

View File

@ -359,10 +359,9 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
this._id !== "default"
) {
// In strict harmony modules we only support the default export
const exportName = `the named export '${this._id}'`;
return [
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)`
)
];
}

View File

@ -84,10 +84,9 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
this._id !== "default"
) {
// In strict harmony modules we only support the default export
const exportName = `the named export '${this._id}'`;
return [
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)`
)
];
}