Reconsider how we deploy JS assets (aka. let's get rid of RequireJS)
#2,158 创建于 2023年6月29日
描述
Right now, we take all the .js files from here and "compile" them into a single JS file where each of them also gets wrapped in a RequireJS require call. The idea here, back in the day, was to separate the JS snippets from each other (e.g. so that you wouldn't get variable name clashes), and to manage their dependencies.
But RequireJS is a bit dated, and is slowly starting to cause problems. Not all JS libraries are ameanable to it anymore, for example.
This is low-priority, but we should think how to architect a better system here that keeps the two properties: (1) Isolation of the different modules, and (2) still allows us to manage dependencies somehow (e.g. that we wouldn't just load multiple versions of the same library). Maybe we can use native JS modules or something nowadays?
X-refs:
- #1247
- #1433
- #2471
- #1433
- #2702