Closed nicolas377 closed 2 years ago
I think it's a good idea, we just need too figure out how to load the modules asynchronously (which is why we have been using require.js)
What do you mean by loading modules asynchronously? Webpack uses a entrypoint file (convenient for us, init.js for all the scripts) and builds a tree of dependencies (ex. init.js uses ui/main, which uses changeInstruments.ts, and so on). I don't think loading modules into webpack's equivalent of the require scope asynchronously is something we really need.
For now, I'm going to turn off CodeQL scanning for the built scripts, and only have it look at source code.
r.js is really not working out well, so i'm going to expedite this to 3.3.0
While r.js is a good method to get production-ready code, its npm package hasn't been touched in three years. There are better, well-maintained packaging solutions, like webpack. I think we should switch to webpack for packaging scripts.
Here's the link to webpack's docs. We also need to use its node api.
Here's some of the things we need to do: