From 4d85aa29fad2427371c17e5d685336b1a071bb79 Mon Sep 17 00:00:00 2001 From: "weiran.zsd" Date: Sun, 3 Mar 2019 12:30:33 +0800 Subject: [PATCH 1/3] Build: bundle espree (fixes eslint/eslint.github.io#546) --- webpack.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 134a657e758..e02291025ab 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,10 +2,13 @@ module.exports = { mode: "none", - entry: ["@babel/polyfill", "./lib/linter.js"], + entry: { + eslint: ["@babel/polyfill", "./lib/linter.js"], + espree: ["./node_modules/espree/espree.js"] + }, output: { - filename: "eslint.js", - library: "eslint", + filename: "[name].js", + library: "[name]", libraryTarget: "umd", globalObject: "this" }, From cba8eb2aa04184a3b9497257190643ccbded6732 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 3 Mar 2019 12:40:24 +0800 Subject: [PATCH 2/3] Update webpack.config.js Co-Authored-By: aladdin-add --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index e02291025ab..663f5ad35df 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ module.exports = { mode: "none", entry: { eslint: ["@babel/polyfill", "./lib/linter.js"], - espree: ["./node_modules/espree/espree.js"] + espree: "espree" }, output: { filename: "[name].js", From fecc3ccded8050551097cbbdeda0430fca027761 Mon Sep 17 00:00:00 2001 From: "weiran.zsd" Date: Sun, 3 Mar 2019 12:44:57 +0800 Subject: [PATCH 3/3] Chore: add babel-polyfill --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 663f5ad35df..4ba329837f4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,7 +4,7 @@ module.exports = { mode: "none", entry: { eslint: ["@babel/polyfill", "./lib/linter.js"], - espree: "espree" + espree: ["@babel/polyfill", "espree"] }, output: { filename: "[name].js",