#How to set up script separation?

3 messages · Page 1 of 1 (latest)

rustic jetty
#

Hello, How can I configure the build for static pages so that each page includes its own file with scripts?

minor pelican
#

hmm, that's a bit tricky, not sure even possible, but one thing get you the same result or even better, is "dynamic import" not only the page loads the needed js but even only when needed e.g. on event,...
I know that all bundled js come with the hoisted file that is loaded on any page, and dynamic import can reduce its size.