Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Feature Request: Automatic Build Time Static Optimization #1046

Open
benbot opened this issue Jan 7, 2020 · 2 comments
Open

Feature Request: Automatic Build Time Static Optimization #1046

benbot opened this issue Jan 7, 2020 · 2 comments

Comments

@benbot
Copy link

benbot commented Jan 7, 2020

It'd be great if we had the same kind of build time static optimization that nextjs has https://nextjs.org/docs/advanced-features/automatic-static-optimization

We could probably just see if a page has a preload at build time and, if not, "export" that component to static or something like that.

Besides the performance gain, if someone was making a static site with sapper it would automatically export it to static which is kind of neat.

@jthegedus
Copy link
Contributor

Regarding this feature, I would expect the output .html file to end up in the static folder to be pushed to the CDN with all other assets, though this makes subsequent builds messy as they would have to cleanup the generated files in static. Perhaps tracking them in the __sapper__/build/build.json manifest we would be able to cleanup the prior output files before generating the new build and manifest.

@benmccann
Copy link
Member

Also requested in #1324

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants