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
fix(nuxt): load spaLoadingTemplate
if file exists
#23048
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Whoops - thank you β€οΈ |
f2194f7
to
d24fc4e
Compare
Signed-off-by: davidglezz <davidg@empathy.co>
Signed-off-by: davidglezz <davidg@empathy.co>
f9a2904
to
cc24c4d
Compare
Signed-off-by: davidglezz <davidg@empathy.co>
cc24c4d
to
b4b362f
Compare
packages/schema/src/config/app.ts
Outdated
* | ||
* Some good sources for spinners are [SpinKit](https://github.com/tobiasahlin/SpinKit) or [SVG Spinners](https://icones.js.org/collection/svg-spinners). | ||
* | ||
* @example ~/app/spa-loading-template.html | ||
* ```html | ||
* <!-- https://github.com/barelyhuman/snips/blob/dev/pages/css-loader.md --> | ||
* <!-- https://gist.github.com/davidglezz/85a2e6185edbd0873a5a2bdb2ce1cd36 --> |
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.
I think we should keep the original credit + loader:
* <!-- https://gist.github.com/davidglezz/85a2e6185edbd0873a5a2bdb2ce1cd36 --> | |
* <!-- https://github.com/barelyhuman/snips/blob/dev/pages/css-loader.md --> |
packages/nuxt/src/core/nitro.ts
Outdated
@@ -415,3 +402,24 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { | |||
function relativeWithDot (from: string, to: string) { | |||
return relative(from, to).replace(/^([^.])/, './$1') || '.' | |||
} | |||
|
|||
function spaLoadingTemplate (options: Nuxt['options']) { |
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.
Totally minor point, but let's take nuxt
as the argument, for consistency with other code.
Thank you for your great work on this PR β€οΈ Pushed directly so we can include in today's patch release. |
spaLoadingTemplate
from default location when set to true
spaLoadingTemplate
from default location when set to true
spaLoadingTemplate
if file exists
π Linked issue
resolves #23047
β Type of change
π Description
The behavior is not the same as documented because was changed in #22798
This PR restores the loading of ~/app/spa-loading-template.html when
spaLoadingTemplate
istrue
π Checklist