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. |
| 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.
how about adding this only when nuxtOptions.ssr === false?
There was a problem hiding this comment.
and spaLoadingTemplate !== false
There was a problem hiding this comment.
but does the HTML include nuxt.options.css in head?
There was a problem hiding this comment.
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.
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.
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.
but does the HTML include
nuxt.options.cssin head?
Yes, the generated html includes the tailwind css bundle
There was a problem hiding this comment.
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.
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.
Just pushed - seems to be working OK; will need to check the appDir! (we'll need to write tests)
spaLoadingTemplate to content resolution
ineshbose
left a comment
There was a problem hiding this comment.
Nice addition, thanks ❤️
🔗 Linked issue
resolves #906
❓ Type of change
📚 Description
This simply adds
spa-loading-template.htmlto the default content config and updates the docs accordingly