GeoFS-Extensions / autoland

Accessible plugins for GeoFS, an online flight simulator.
https://geofsautoland.wixsite.com/autoland
GNU General Public License v3.0
6 stars 2 forks source link

FEATURE: Switch to webpack #120

Closed nicolas377 closed 2 years ago

nicolas377 commented 2 years ago

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:

Guy-Adler commented 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)

nicolas377 commented 2 years ago

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.

nicolas377 commented 2 years ago

For now, I'm going to turn off CodeQL scanning for the built scripts, and only have it look at source code.

nicolas377 commented 2 years ago

r.js is really not working out well, so i'm going to expedite this to 3.3.0