fix(mjs): remove unused namespace build errors

This commit is contained in:
alreadyExisted 2019-04-25 18:58:20 +03:00 committed by Tobias Koppers
parent acf2c2d4b1
commit df5e118da4
3 changed files with 4 additions and 15 deletions

View File

@ -355,12 +355,11 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
// It's not an harmony module
if (
this.originModule.buildMeta.strictHarmonyModule &&
this._id &&
this._id !== "default"
) {
// In strict harmony modules we only support the default export
const exportName = this._id
? `the named export '${this._id}'`
: "the namespace object";
const exportName = `the named export '${this._id}'`;
return [
new HarmonyLinkingError(
`Can't reexport ${exportName} from non EcmaScript module (only default export is available)`

View File

@ -80,12 +80,11 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
// It's not an harmony module
if (
this.originModule.buildMeta.strictHarmonyModule &&
this._id &&
this._id !== "default"
) {
// In strict harmony modules we only support the default export
const exportName = this._id
? `the named export '${this._id}'`
: "the namespace object";
const exportName = `the named export '${this._id}'`;
return [
new HarmonyLinkingError(
`Can't import ${exportName} from non EcmaScript module (only default export is available)`

View File

@ -1,19 +1,10 @@
module.exports = [
[
/Can't import the namespace object from non EcmaScript module \(only default export is available\)/
],
[
/Can't import the namespace object from non EcmaScript module \(only default export is available\)/
],
[
/Can't import the named export 'data' from non EcmaScript module \(only default export is available\)/
],
[
/Can't import the named export 'data' from non EcmaScript module \(only default export is available\)/
],
[
/Can't reexport the namespace object from non EcmaScript module \(only default export is available\)/
],
[
/Can't reexport the named export 'data' from non EcmaScript module \(only default export is available\)/
]