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

feat: introduce clientBundle.scan #243

Merged
merged 7 commits into from
Aug 27, 2024
Merged

feat: introduce clientBundle.scan #243

merged 7 commits into from
Aug 27, 2024

Conversation

antfu
Copy link
Member

@antfu antfu commented Aug 27, 2024

This PR introduces the clientBundle.scan option, which will do a static scan for all components/markdowns and include them in the client bundle. This would resolve #34

Note

For v1.5.x, this option is NOT enabled by default for experiments. We might consider to enable it in the future version.
To enable it, set:

export default defineNuxtConfig({
  modules: [
    '@nuxt/icon'
  ],
  icon: {
    clientBundle: {
      scan: true, // <!--
    },
  },
})

Also introduced the clientBundle.sizeLimitKb option to guard and avoid resulting oversized bundle.

@antfu antfu changed the title feat: new hook for client bundle icons feat: introduce clientBundle.scan Aug 27, 2024
@antfu antfu merged commit bad9e0d into main Aug 27, 2024
1 check passed
@antfu antfu deleted the feat/scan branch August 27, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Include Icons in build instead of doing network requests
1 participant