Nuxt Rebundle is an experimental Nuxt module designed to explore and implement advanced bundler optimizations for Nuxt applications. As of version 0.0.2, it is a 'work-in-progress laboratory,' focusing primarily on automatically splitting `useAsyncData` fetcher functions into asynchronous chunks. This feature is particularly beneficial for static site generation (SSG) scenarios to improve initial page load performance by deferring the loading of data-fetching logic until it's needed. Due to its early development stage, there is no predictable release cadence, and the module should be approached with caution as its API and internal workings are subject to frequent changes. Key differentiators include its tight integration with Nuxt's build process to automatically apply specific optimization patterns that might otherwise require complex manual configuration, though its feature set is currently limited to `useAsyncData` splitting.
npm install nuxt-rebundleVerified import paths — ran on the pinned version, not inferred.
Illustrates how to install `nuxt-rebundle` via `nuxi` and register it in `nuxt.config.ts`.
Use with caution and monitor the GitHub repository for updates on stability and feature completeness. Avoid deploying to critical production environments.
Pin the exact version of `nuxt-rebundle` in your `package.json` and thoroughly review the `CHANGELOG.md` before upgrading to any new version.
Verify that this specific optimization aligns with your project's performance goals, as other bundler optimizations are not covered by this module.
Ensure you have run `npx nuxi@latest module add nuxt-rebundle` and that `modules: ['nuxt-rebundle']` is correctly present in your `nuxt.config.ts` file.
Nuxt modules are registered by string name in `nuxt.config.ts`. Avoid direct `import` or `require` statements for the `nuxt-rebundle` package in your application code.