Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -9,7 +9,7 @@ const HarmonyCompatibilityDependency = require("./HarmonyCompatibilityDependency
module.exports = class HarmonyDetectionParserPlugin {
apply(parser) {
parser.plugin("program", (ast) => {
var isHarmony = ast.body.some(statement => {
const isHarmony = ast.body.some(statement => {
return /^(Import|Export).*Declaration$/.test(statement.type);
});
if(isHarmony) {
@@ -32,7 +32,7 @@ module.exports = class HarmonyDetectionParserPlugin {
module.exportsArgument = "__webpack_exports__";
}
});
var nonHarmonyIdentifiers = ["define", "exports"];
const nonHarmonyIdentifiers = ["define", "exports"];
nonHarmonyIdentifiers.forEach(identifer => {
parser.plugin(`evaluate typeof ${identifer}`, nullInHarmony);
parser.plugin(`typeof ${identifer}`, skipInHarmony);