Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy loading #35

Open
dgp1130 opened this issue Feb 26, 2021 · 0 comments
Open

Lazy loading #35

dgp1130 opened this issue Feb 26, 2021 · 0 comments
Labels
feature New feature or request

Comments

@dgp1130
Copy link
Owner

dgp1130 commented Feb 26, 2021

Need to investigate the lazy loading story. My hope is that we can rely on users leveraging dynamic import() at a known URL. If we can update Rollup to chunk a particular file to an independent module as ESM, this could just work out of the box. It's unknown how much work this is for Rollup to create a manual common chunk like this and how much boilerplate will be necessary to make it happen. Ideally such a path would be included in a web_resources() rule and even check via strict deps in a rules_prerender TS plugin. The MVP for this probably won't go that far.

We should also investigate how plausible it is to support tree shaking for symbols inside the common chunk. Rollup should have all the knowledge necessary to make that happen, but I'm not familiar enough with Rollup configuration to know how hard that is.

We should also investigate lazy loading for custom bundled pages and how we can make that easier. I'm not sure there's a whole lot to do here, but we should at least see what it is like and what problems users would run into here.

@dgp1130 dgp1130 added the feature New feature or request label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant