CSS CORS issue after nuxt generate #19270
Unanswered
venkateshgiri
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I guess you need to set the |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am currently working on migrating our project from nuxt 2 to nuxt 3. I have created a new project and started to move the code. We are trying to serve the css files via cdn url. All the js files, image files are getting loaded. But css files throws cors error for certain files. The bundler used is vite.
Observations:
component specific css is getting downloaded successfully. But css related to vuetify, scss files inside assets are causing issues. Saying this as css files with component prefix are getting parsed. we have set ssr:false and use nuxt generate to get the files and upload it to s3 and serve via fastly url.
The GET request is 200. But CORS error.
The repo we use is kind of specific to org.
The vite version we are using is "vite": "^6.0.5" under vite builder as a dependency in package-lock.json. Attaching the screenshots of the dependency list.
Sharing the config file as well:
After the nuxt generate the cross origin attribute is present on the link tags in index.html file under .output/public.
<link rel="stylesheet" href="https://-------/_nuxt/entry.CvBYcn7H.css" crossorigin>
Reproduction
Steps to reproduce
No response
System Info
*
Used Package Manager
npm
Logs
Created an issue on nuxt repo as well.
nuxt/nuxt#30697
Validations
Beta Was this translation helpful? Give feedback.
All reactions