-
Notifications
You must be signed in to change notification settings - Fork 184
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(content): add spaLoadingTemplate
to content resolution
#907
Conversation
β Deploy Preview for nuxt-tailwindcss ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Summary
These changes ensure that the new template can be easily identified and utilized by our system, improving the product's flexibility and usability. |
src/resolvers.ts
Outdated
@@ -53,6 +53,7 @@ const resolveContentPaths = (srcDir: string, nuxtOptions = useNuxt().options) => | |||
r(`{A,a}pp${sfcExtensions}`), | |||
r(`{E,e}rror${sfcExtensions}`), | |||
r(`app.config${defaultExtensions}`), | |||
r(`spa-loading-template.html`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding this only when nuxtOptions.ssr === false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and spaLoadingTemplate !== false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but does the HTML include nuxt.options.css
in head?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding this only when
nuxtOptions.ssr === false
?
Wouldn't nuxtOptions.ssr === false
mean it is only included when ssr is turned off for the entire application?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and
spaLoadingTemplate !== false
I guess a check for nuxtOptions.spaLoadingTemplate !== false
should work, yes. I thought since error.vue
e.g. is included without checking if the file exists in the project that a simple list of all possible files is preferred, otherwise I can add this check :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So nuxtOptions.spaLoadingTemplate
can be a string
as well i.e., a custom name for spa-loading-template.html
possibly - but it will be applied when ssr: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but does the HTML include
nuxt.options.css
in head?
Yes, the generated html includes the tailwind css bundle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I didn't realize a custom file name could be passed... I will check this and the ssr option asap and report back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I'm a little bit confused. When I turn off ssr for the entire application, the styles do not get included, but when I use routeRules the styles get injected. I've only tested this in the playground for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed - seems to be working OK; will need to check the appDir! (we'll need to write tests)
spaLoadingTemplate
to content resolution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition, thanks β€οΈ
π Linked issue
resolves #906
β Type of change
π Description
This simply adds
spa-loading-template.html
to the default content config and updates the docs accordingly