From 8d5ad83b3274029e37386dbd5d0c64d8102bcd6f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 20 May 2019 09:45:56 +0200 Subject: [PATCH] simplify code --- lib/dependencies/HarmonyExportImportedSpecifierDependency.js | 3 +-- lib/dependencies/HarmonyImportSpecifierDependency.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js index 1183dc542..15429b6ed 100644 --- a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +++ b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js @@ -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)` ) ]; } diff --git a/lib/dependencies/HarmonyImportSpecifierDependency.js b/lib/dependencies/HarmonyImportSpecifierDependency.js index 76b9e2410..d07fbf1ca 100644 --- a/lib/dependencies/HarmonyImportSpecifierDependency.js +++ b/lib/dependencies/HarmonyImportSpecifierDependency.js @@ -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)` ) ]; }