-
Notifications
You must be signed in to change notification settings - Fork 4
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
nuxt/fonts does not honour the nuxt baseUrl setting #147
Comments
To address the issue where const assetsBaseURL = process.env.NUXT_APP_BASE_URL ? joinURL(process.env.NUXT_APP_BASE_URL, options.prefix || '/_fonts') : (options.prefix || '/_fonts'); This code checks if Ensure that This solution is designed to prepend the Regarding the This approach should help you use
|
Can confirm I'm seeing this too. Have a root app running at "/" where @nuxt/font works perfectly. Simply set the base URL to something else and the fonts don't load |
When I set the nuxt baseURL (I set it at run time via the NUXT_APP_BASE_URL env var), nuxt/fonts can no longer access its cached fonts.
It appears that it always sets the font url to start with /_fonts no matter what, rather than /_fonts. While I didn't try I assume cdnURL will also not work with nuxt fonts.
While I need to set the NUXT_APP_BASE_URL at runtime, as a test I tried rebuilding the app with the fonts.assets.prefix setting hard coded to /prefix/_fonts and running it with NUXT_APP_BASE_URL=/prefix/, but fonts.assets.prefix changed the path of the fonts within the public directory, not the URL through which the fonts are accessed.
Is there any way to use nuxt fonts with a baseUrl set to anything but '/'?
The text was updated successfully, but these errors were encountered: