-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Since version 0.12.0 with nuxt > 4.2.0 the baseUrl was not used correctly.
When I set a baseUrl like that :
{
app: {
baseURL: "/page/",
},
runtimeConfig: {
app: {
baseURL: "/page/"
}
}
}
When I set the assets prefix :
fonts: {
assets: {
// for fix bad url with @nuxt/fonts
prefix: "/page/_fonts/",
},
},
I have :
And the good url to access the fonts is /page/page/_fonts/...
With the previous version, I didn't need to set anything up and everything worked...
For the moment I fix it with a custom route who redirect to the /page/page/fonts/
//for bugfix bad url with nuxt fonts
export default defineEventHandler(async (event) => {
const fontPath = getRouterParam(event, "_");
if (!fontPath) {
throw createError({
statusCode: 404,
statusMessage: "Not Found",
});
}
await sendRedirect(event, `/page/page/_fonts/${fontPath}`, 301);
});
vysual-julien and simonmaass
Metadata
Metadata
Assignees
Labels
No labels