You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Nuxt project and I want to deploy the analyzer report in the same dist folder with the static generated output of Nuxt, in short, as a sub-page of my website.
Basically, I'm running nuxt generate && windicss-analysis --html dist/styles and everything is exported fine, however, the linked resources all start with a leading / so when the browser tries to load them all result in a 404 since they are not in the root folder (i.e. they are in /styles/* instead of /*).
Possible solutions
Try and remove the leading / from imported resources (it seems like Storybook does this)
Add another flag when exporting to specify a base path, e.g. --base-path
The text was updated successfully, but these errors were encountered:
Yeah, good point. Vite already handles that and all we need to do is add another cli option --base and pass it to the Vite's config. https://vitejs.dev/config/#base
I would've submitted a PR but looking through the code I'm not sure I get how the build phase works. It looks like the package when installed is already built by vite, right? How should that option be implemented if the --html script just copies the already built package and adds the generated output?
Context
I have a Nuxt project and I want to deploy the analyzer report in the same
dist
folder with the static generated output of Nuxt, in short, as a sub-page of my website.Basically, I'm running
nuxt generate && windicss-analysis --html dist/styles
and everything is exported fine, however, the linked resources all start with a leading/
so when the browser tries to load them all result in a 404 since they are not in the root folder (i.e. they are in/styles/*
instead of/*
).Possible solutions
/
from imported resources (it seems like Storybook does this)--base-path
The text was updated successfully, but these errors were encountered: