Closed smolinari closed 2 years ago
Hi @smolinari! 👋
It looks like you provided an invalid or unsupported reproduction URL. Do not use any service other than Codepen, jsFiddle, Codesandbox, and GitHub. Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc. Please edit your original post above and provide a valid reproduction URL as explained.
Without a proper reproduction, your issue will have to get closed.
Thank you for your collaboration. 👏
Props in viteConf are not ensured. Different stuff happens based on what you are doing: dev or prod, what Quasar mode etc.
I can't stub all these because the presence of some objects changes the behavior of Vite in unwanted ways.
viteConf.server = viteConf.server || {}
viteConf.server.fs = viteConf.server.fs || {}
viteConf.server.fs.allow = ....
Ok. So, I've put that line of code in an if statement based on the env.
extendViteConf (viteConf) {
if (ctx.dev) {
viteConf.server.fs.allow = ['../../..']
}
}
And building is now working.
Scott
What happened?
I have a Rush monorepo and using
quasar dev
I was getting 403s returned for some resource URLs. After investigating, I found the solution in adding a path toserver.fs.allow
of the Vite config object.quasar.config.js
This fixes the 403s, however, when I go to build the SPA, I get the following error:
What did you expect to happen?
No error during the build process.
Reproduction URL
I don't have one made.
How to reproduce?
viteConf
.quasar build
Flavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)
Platforms/Browsers
Chrome
Quasar info output
Relevant log output
No response
Additional context
No response