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

Nuxt 3 / Vite prefetch all assets & modules while starting page #14093

Closed
dungonfq opened this issue Jun 2, 2022 · 1 comment
Closed

Nuxt 3 / Vite prefetch all assets & modules while starting page #14093

dungonfq opened this issue Jun 2, 2022 · 1 comment

Comments

@dungonfq
Copy link

dungonfq commented Jun 2, 2022

Environment

Development & Production

Reproduction

Development:
https://stackblitz.com/edit/github-o1kjbh-8gikuu

  1. Visit https://github-o1kjbh-8gikuu--3000.local.webcontainer.io/
  2. Open Devtool => Network tabs
  3. Reload the page to see all the modules, .css files was prefetched. It even loads lodash modules

Describe the bug

Hi team, I'm facing the rate limit issue which cause 403 error on my server. What I discoveried is Nuxt's trying to prefetch all modules, .js, .css files at once on the first time I visit a page.

Do we have a config in nuxt.config.ts to limit the loaded module OR loading module on demand only OR preven prefetching? Instead of fetching all modules every time visiting a page, we only need to load components, css or modules which were used / imported in the current page only

Additional context

#13778

Possible solution?
nuxt-contrib/vue-bundle-renderer#30

Logs

No response

@dungonfq dungonfq changed the title Nuxt 3 load all modules at starting page Nuxt 3 load all modules at once while starting page Jun 2, 2022
@dungonfq dungonfq changed the title Nuxt 3 load all modules at once while starting page Nuxt 3 / Vite load all modules at once while starting page Jun 2, 2022
@dungonfq dungonfq changed the title Nuxt 3 / Vite load all modules at once while starting page Nuxt 3 / Vite prefetch all assets & modules while starting page Jun 3, 2022
@danielroe
Copy link
Member

Thanks. Let's track this in #13778 👍

@danielroe danielroe closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants