Skip to content

Commit

Permalink
simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 12, 2019
1 parent df5e118 commit 8d5ad83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/dependencies/HarmonyExportImportedSpecifierDependency.js
Expand Up @@ -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)`
)
];
}
Expand Down
3 changes: 1 addition & 2 deletions lib/dependencies/HarmonyImportSpecifierDependency.js
Expand Up @@ -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)`
)
];
}
Expand Down

0 comments on commit 8d5ad83

Please sign in to comment.