rovelstars / reejs

Make Sites Faster, without the need of building anything!
https://ree.js.org
MIT License
300 stars 16 forks source link

Feature request: implement & add preloading support for client side #13

Open renhiyama opened 9 months ago

renhiyama commented 9 months ago

Implement and add preloading support for all files (components, utils & other files) that are imported on the current page, recursively. Packit uses es-module-lexer that comes bundled with reejs at @reejs/imports/lexer.js, please make use of it to not include more dependencies by default.

renhiyama commented 9 months ago

Plus try not to continue anymore when it comes to loading third party libraries. You might mess up with import maps, and esm.sh already has added support for preloading nested imports on their side.

dburles commented 2 weeks ago

Might be able to make use of https://github.com/dburles/modulepreload-link-relations. It uses es-module-lexer as its only dependency. I'm working on a branch at the moment that adds import map support.