Page MenuHomePhabricator

Replace CommonJS requires and module.exports with ECMAScript imports and exports
Closed, DeclinedPublic

Description

Replace require with import and module.export with export. Tree shaking requires ES6 module syntax and ECMAScript modules have been standardized by TC39.

Use Popups as an example. It has a very similar Webpack and test configuration and already uses ES6 imports.

Changes to M.require() / M.define() are out of scope.

Acceptance criteria

  • All CommonJS require and module.exports are replaced with import and export. This includes src/, tests/, and even webpack.config.js.
  • Any changes made to webpack.config.js are copied to Popups.
  • No regressions to production or test code..

Event Timeline

Krinkle renamed this task from Replace Common.js requires and module.exports with ECMAScript imports and exports to Replace CommonJS requires and module.exports with ECMAScript imports and exports.Feb 26 2019, 7:13 PM
Jdlrobson subscribed.

Awaiting output of T279108