You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The editor build process currently involves concatenating a set of front end scripts together, which is output here. These scripts contain a mix of ES6 and ES5 syntax and any script dependencies are shared using the browsers global namespace.
I am proposing that we introduce a JS bundler to the editors build process, giving us more control over how we build it's front end. It would enable us to make the following changes to the build:
Compress the front end code to reduce the editor download size (should also include source maps to enable in browser debugging)
Integrate the editor front end more closely with our open source projects (import dependencies directly from the engine / pcui / observer etc as and when needed)
Enhance the development process with watch tasks / build analytics / transpiler checks
Introduce ESModules into the front end codebase, allowing us to explicitly define what each scripts imports / exports
To keep the editor consistent with our open source projects, rollup can be used as the bundler.
The introduction of this build process should not drastically change the output of the editor.js file as I imagine the initial update would maintain the current structure of the code base, with scripts depending on globally defined variables. However with the introduction of ESModules, it will be possible to slowly remove all of these global dependencies from the codebase over time. This could have an impact on external editor scripts / extensions which depend on certain global variables. It would be important during this transition that any extensions use only on our open source offerings (editor-api / pcui etc), where any breaking changes can be tracked.
The text was updated successfully, but these errors were encountered:
The editor build process currently involves concatenating a set of front end scripts together, which is output here. These scripts contain a mix of ES6 and ES5 syntax and any script dependencies are shared using the browsers global namespace.
I am proposing that we introduce a JS bundler to the editors build process, giving us more control over how we build it's front end. It would enable us to make the following changes to the build:
To keep the editor consistent with our open source projects, rollup can be used as the bundler.
The introduction of this build process should not drastically change the output of the
editor.js
file as I imagine the initial update would maintain the current structure of the code base, with scripts depending on globally defined variables. However with the introduction of ESModules, it will be possible to slowly remove all of these global dependencies from the codebase over time. This could have an impact on external editor scripts / extensions which depend on certain global variables. It would be important during this transition that any extensions use only on our open source offerings (editor-api / pcui etc), where any breaking changes can be tracked.The text was updated successfully, but these errors were encountered: