Replace custom module system with JS modules and a build step

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.


Replace custom module system with JS modules and a build step

TODO before merging:

  • port old qunit tests to jasmine (seems they depend on extension.json too!)
  • evaluate a way to prevent commiting the build / manual build step
  • remove all the manual dependency mapping in extension.json
  • remove all __namespace.js files
  • production build config

Possible next steps this enables:

  • server-side rendering of at least some of the components (see vue-ssr-spike)
  • add babel for ES2015+ support
  • webpack-dev-server / hot module reloading

While implementing the vue server-side-rendering spike, we had issues with JS
tooling such as webpack because the module alias system isn't understood. It
also breaks IDE navigation and refactoring and violates the principle of least
surprise. That's little benefit over typing out relative paths (or having the
IDE do it for you).

This comes with the downside of a build step, but we need that anyway to adopt
current JS language features without losing browser compatibility. It will also
allow us to enable modern developer tooling like hot reloading.

For now we would probably need to commit the result of the build to the
repository, although I'd prefer the build to be run on Jenkins and the result
stored in a artifact repository instead since this will create big diffs and is
manual overhead.

Change-Id: Ia070810ccb5acb42ab891442e1df5f24b63d2d63


christophneurothAuthored on Sep 25 2017, 2:26 PM

Commit No Longer Exists

This commit no longer exists in the repository.