-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(vue-renderer): improvements #4722
Conversation
we can't apply defaults to the context to prevent breaking changes
Could we extract all those hook identifiers into some object? That way IDE's can possibly autocomplete them and the chance of errors (by nuxt users) due to small typos is much smaller. Also there is no overview now anywhere with a full list of all available hooks. I would imagine something like: export const hookIds = {
build: {
done: 'build:done',
},
vue-renderer: { // <- dash might be an issue
ssr: {
context: 'vue-rendere:ssr:content'
}
...
} Then if someone wants to use a hook they can either use the text itself (but that'd be mainly for backwards compatiblity) but the preferred way would be to import the nuxtHooks object and just do -- edit -- |
Codecov Report
@@ Coverage Diff @@
## dev #4722 +/- ##
=========================================
+ Coverage 92.79% 92.9% +0.11%
=========================================
Files 73 73
Lines 2429 2439 +10
Branches 596 599 +3
=========================================
+ Hits 2254 2266 +12
+ Misses 160 158 -2
Partials 15 15
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## dev #4722 +/- ##
==========================================
+ Coverage 92.28% 92.31% +0.02%
==========================================
Files 74 74
Lines 2450 2459 +9
Branches 603 606 +3
==========================================
+ Hits 2261 2270 +9
Misses 169 169
Partials 20 20
Continue to review full report at Codecov.
|
Types of changes
Description
New Hooks
Shared:
vue-renderer:context
: Final chance to extend context. (Setting modern, spa, url, etc)SSR:
vue-renderer:ssr:prepareContext
: Inject to the context beforerenderToString
vue-renderer:ssr:context
: Extend rendered context. Ultimate possibilities for SSR hacks!vue-renderer:ssr:csp
: Extend generated CSP string hashesvue-renderer:ssr:templateParams
: Customize HTML template paramsSPA:
vue-renderer:spa:templateParams
: Cutomize HTML template params for SPAChecklist: