Commit df9c846
authored
* feat: unified vite plugin per framework, rename @unhead/addons to @unhead/bundler
Adds `./vite` export to each framework package (@unhead/vue, @unhead/react,
@unhead/svelte, @unhead/solid-js) that composes build optimizations and
streaming SSR into a single plugin call.
Before:
import Unhead from '@unhead/addons/vite'
import { unheadVuePlugin } from '@unhead/vue/stream/vite'
plugins: [vue(), Unhead(), unheadVuePlugin()]
After:
import unhead from '@unhead/vue/vite'
plugins: [vue(), unhead()]
Other changes:
- Rename @unhead/addons to @unhead/bundler
- Deprecated @unhead/addons alias in packages-aliased/
- Normalize plugin options: all accept `false` to disable
- Streaming is opt-in (`streaming: true`)
- Deprecate `treeshake.enabled` in favor of `treeshake: false`
- Add `moduleType: 'js'` to streaming load hooks for Rolldown compat
- Use hook filter objects on resolveId/load for Rolldown performance
- Remove stale Vite 4 compat code
* docs: update install guides to use unified vite plugin
Replace duplicated tree-shaking snippets in schema-org install docs with
framework-specific examples using the new unified plugin. Rewrite the main
Vite Plugin guide as the canonical reference for all frameworks. Update
minify docs to reference the unified plugin.
* docs: use generic wording for vite plugin recommendation
Focus on the primary benefits (tree-shaking server code, transforming
head composables) rather than the niche schema-org stripping.
1 parent 093a277 commit df9c846
File tree
68 files changed
+707
-704
lines changed- bench
- docs
- 0.angular/schema-org/guides/get-started
- 0.react/schema-org/guides/get-started
- 0.solid-js/schema-org/guides/get-started
- 0.svelte/schema-org/guides/get-started
- 0.typescript/schema-org/guides/get-started
- 0.vue/schema-org/guides/0.get-started
- head/1.guides
- 2.advanced
- plugins
- examples
- vite-ssr-react-streaming
- vite-ssr-react-ts
- vite-ssr-solidjs-streaming
- vite-ssr-svelte-streaming
- vite-ssr-vue-prerender
- vite-ssr-vue-streaming
- packages-aliased/addons
- src
- packages
- bundler
- src
- minify
- unplugin
- test
- react
- src
- solid-js
- src
- svelte
- src
- unhead/src/stream
- vue
- src
- test/bench
- test/exports
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
68 files changed
+707
-704
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 2 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 72 | + | |
86 | 73 | | |
87 | 74 | | |
88 | 75 | | |
| |||
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| |||
Lines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
| 124 | + | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | | - | |
136 | | - | |
137 | 131 | | |
138 | 132 | | |
139 | 133 | | |
| |||
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
| |||
Lines changed: 2 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 70 | + | |
84 | 71 | | |
85 | 72 | | |
86 | 73 | | |
| |||
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
81 | 79 | | |
82 | 80 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
86 | 82 | | |
87 | 83 | | |
88 | 84 | | |
| |||
0 commit comments