Decision around build tools (Webpack, Rollup, Vite, etc), formats (CommonJS, ESModules, UMD), delivery (vendored in MediaWiki? Published to NPM?), etc.
**Considerations**
* Webpack has been the de-facto standard for a long time, but it is also very complex and pretty resource-intensive.
* Webpack seems to be the only build tool that can easily output code into "CommonJS2" format (as opposed to plain CommonJS format). CJS2 is directly compatible with ResourceLoader's own module system; some additional work might be needed to support plain CJS.
* Tools like Vite or Rollup make it easy to do tree-shaking (dead code elimination)
* Vite requires Node.js of at least v12, which is newer than what we are currently using in CI
* Storybook used to require Webpack, but it recently added support for alternate builders like Vite
* WVUI's current approach of bundling specific builds for different use-cases upstream, as part of the library (full build vs search build for example) is not sustainable as a general strategy in the long run; by providing an ESModule build of our shared library and allowing consuming applications to use their own build tools, each consumer could bundle only the needed components
**Decision**
1. //What build tool will we use to generate a production version of the shared library?//
- Main options are probably Webpack, Rollup, Vite, or potentially ESBuild on its own
- Tools and dependencies may need to be audited by security; this may also require upgrading Node version in our CI stack; does this block us from using tools we want outside of MW infrastructure (Github or Gitlab CI, for example) if we need support immediately?
2. //What other development tools do we want to incorporate into the shared library?//
- Beyond standard things like linters and tests, this would include things like Storybook
3. //What kinds of bundles do we want to actually ship?//
- Supported formats (CommonJS, ESModules, etc)
- Application-specific builds (like WVUI search, etc)
- How does CSS get bundled?