Skip to content

Commit

Permalink
Build: bundle espree (fixes eslint/archive-website#546) (#11467)
Browse files Browse the repository at this point in the history
* Build: bundle espree (fixes eslint/archive-website#546)

* Update webpack.config.js

Co-Authored-By: aladdin-add <weiran.zsd@outlook.com>

* Chore: add babel-polyfill
  • Loading branch information
aladdin-add authored and not-an-aardvark committed Mar 5, 2019
1 parent 458053b commit fe1a892
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webpack.config.js
Expand Up @@ -2,10 +2,13 @@

module.exports = {
mode: "none",
entry: ["@babel/polyfill", "./lib/linter.js"],
entry: {
eslint: ["@babel/polyfill", "./lib/linter.js"],
espree: ["@babel/polyfill", "espree"]

This comment has been minimized.

Copy link
@aladdin-add

aladdin-add Mar 5, 2019

Author Member

there is room to opt here, I think:

  • set external: { espree: "./build/espree.js"}, to avoid loading a different js bundle.
  • separate @babel/polyfill to avoid cache invalidations.
},
output: {
filename: "eslint.js",
library: "eslint",
filename: "[name].js",
library: "[name]",
libraryTarget: "umd",
globalObject: "this"
},
Expand Down

0 comments on commit fe1a892

Please sign in to comment.