keyman icon indicating copy to clipboard operation
keyman copied to clipboard

refactor(web): move to es modules and appropriate build tools for bundling keymanweb.js

Open mcdurdin opened this issue 2 years ago • 0 comments

The js module fight seems to have resolved in favour of ES modules. It'll be some time before we can use them in browsers that we support. However, we can use bundling tools like webpack, browserify, or esbuild to transpile them into a bundle.

We should be:

  1. Ceasing use of namespaces
  2. Replacing all uses of require() and other, more hacky, import methods to ESM import.
  3. Moving from tsc's project prepending tool to use of a bundling tool where needed for deployable artifacts
  4. Updating all package.json and tsconfig.json to refer to the appropriate module format.

See also #7328

mcdurdin avatar Sep 17 '22 19:09 mcdurdin