mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
perf(nuxt): avoid duplicate useRuntimeConfig
call (#24843)
This commit is contained in:
parent
8917e5f564
commit
2cab4cba12
@ -14,6 +14,7 @@ export function buildAssetsURL (...path: string[]): string {
|
||||
}
|
||||
|
||||
export function publicAssetsURL (...path: string[]): string {
|
||||
const publicBase = useRuntimeConfig().app.cdnURL as string || useRuntimeConfig().app.baseURL
|
||||
const app = useRuntimeConfig().app
|
||||
const publicBase = app.cdnURL as string || app.baseURL
|
||||
return path.length ? joinURL(publicBase, ...path) : publicBase
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user