Babylon.js
Babylon.js copied to clipboard
ESM support
Add ECMAScript Modules support to our new build system. This will allow bundlers to remove unnecessary code, allowing sites to ship less codes to get faster load. It will also allow to import directly from the root (side effect free).
- [x] Tech Investigation
- Find out what typescript features require tslib even when targeting es6+ (for example - decorators)
- Research about features in different es targets
- Make small reproductions of different sections of the library and experiment with tree shaking
- Make a dependency tree graph(s) for the packages-overview and each package individually
- Decide which part of the framework will be the first to be implemented (suggestion - core/engines)
- [x] Define guidelines
- Decide what target we compile to (es12? esNext?)
- Make decisions regarding build process - packer, packages included, declaration methods
- Make decisions regarding project structure - what stays in dev, what leaves to lts, how to continue supporting all features in a fast and efficient way
- Fully document the process and future steps.
- [ ] ThinEngine Implementation
- [ ] Web Engines (WebGL and WebGPU) implementation
- [ ] Scene Implementation
thanks @RaananW for the update.
If users have to rely on NPM and Webpack etc, Babylon doesn't really support ES6 modules, or the Web. It only adds support for current Node workarounds.
To be revisited.