add missing default export as provided export to json modules

This commit is contained in:
Tobias Koppers 2018-12-30 11:58:36 +01:00
parent 762155dc2d
commit 94db4cc30f
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ class JsonParser {
state.module.buildInfo.jsonData = data;
state.module.buildMeta.exportsType = "named";
if (typeof data === "object" && data) {
state.module.addDependency(new JsonExportsDependency(Object.keys(data)));
state.module.addDependency(
new JsonExportsDependency(Object.keys(data).concat("default"))
);
}
state.module.addDependency(new JsonExportsDependency(["default"]));
return state;