You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Webpack allows using ES6 modules to split code instead of using global variables. It transforms ES6 modules into code that can be ran in the environment that doesn't support ES6 modules yet (for example current Chrome version). It also can use CommonJS modules like https-everywhere-rules which is a ruleset parsing library working in Node and browser, complete with Mocha unit tests, which I used to create a list of rulesets which have failed the ruleset test (#11114). It will also make developing and running unit tests for HTTPS Everywhere code easier.
The link I gave to https://webpack.js.org/guides/getting-started/#es2015-modules says that Webpack transpiles import/export statements but nothing else. So if you're importing a module that only contains ES5 stuff, you're fine, but if you're importing a module that contains ES6 stuff then you need something like Babel.
In other words, by itself Webpack can handle the ES6 module concept, but not a module that has ES6 contents. Does this match your testing?
Activity
jeremyn commentedon Jul 21, 2017
I support switching the current extension build process from the current homegrown bash/Python stuff to npm+webpack+etc. This might be useful: https://github.com/mdn/webextensions-examples/tree/master/webpack-modules.
You need something like Babel for this, see https://webpack.js.org/guides/getting-started/#es2015-modules.
jeremyn commentedon Jul 21, 2017
The link I gave to https://webpack.js.org/guides/getting-started/#es2015-modules says that Webpack transpiles
import/exportstatements but nothing else. So if you're importing a module that only contains ES5 stuff, you're fine, but if you're importing a module that contains ES6 stuff then you need something like Babel.In other words, by itself Webpack can handle the ES6 module concept, but not a module that has ES6 contents. Does this match your testing?