From 5a31a922600a0ca373cc18b182cafd6cd0bcefce Mon Sep 17 00:00:00 2001 From: Teddy Katz Date: Wed, 24 Oct 2018 17:22:18 -0400 Subject: [PATCH] Build: compile espree's deps to ES5 when generating site (fixes #11014) (#11015) Previously, the build process would compile ESLint's dependencies to ES5 when generating a website bundle, but not espree's dependencies. Now that espree has dependencies with ES6 code, it's necessary to also compile espree's dependencies. --- Makefile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.js b/Makefile.js index 896be6a5b72..473ffdf5887 100644 --- a/Makefile.js +++ b/Makefile.js @@ -849,7 +849,7 @@ target.browserify = function() { exec(`${getBinFile("browserify")} -x espree ${TEMP_DIR}linter.js -o ${BUILD_DIR}eslint.js -s eslint --global-transform [ babelify --presets [ es2015 ] ]`); // 6. Browserify espree - exec(`${getBinFile("browserify")} -r espree -o ${TEMP_DIR}espree.js`); + exec(`${getBinFile("browserify")} -r espree -o ${TEMP_DIR}espree.js --global-transform [ babelify --presets [ es2015 ] ]`); // 7. Concatenate Babel polyfill, Espree, and ESLint files together cat("./node_modules/babel-polyfill/dist/polyfill.js", `${TEMP_DIR}espree.js`, `${BUILD_DIR}eslint.js`).to(`${BUILD_DIR}eslint.js`);