Environment
- Operating System:
Linux
- Node Version:
v14.18.1
- Nuxt Version:
3.0.0-27304790.cad09fe
- Package Manager:
npm@6.14.15
- Bundler:
Vite
- User Config:
build, css, publicRuntimeConfig, vite
- Runtime Modules:
-
- Build Modules:
-
Reproduction
https://codesandbox.io/s/new-wood-hx840?file=/nuxt.config.ts
Notes:
- The sandbox is configured in a way that the code is ran in production mode (
npm run build && npm run start)
- The CDN URL used is a BunnyCDN Pull Zone. The pull zone is set to fetch files from the sandbox URL:

Describe the bug
After build.publicPath in nuxt.config.ts is changed to any URL, the whole application (pages and assets) will return a 404 error. Changing it to a single folder name, no errors occur.
Additional context
As of my understanding, changing build.publicPath to a CDN URL would make all assets go into the .output/public folder instead of the .output/public/_nuxt folder. The assets are actually there, but navigating to them also returns a 404 error.
Logs
No response
Environment
Linuxv14.18.13.0.0-27304790.cad09fenpm@6.14.15Vitebuild,css,publicRuntimeConfig,vite--Reproduction
https://codesandbox.io/s/new-wood-hx840?file=/nuxt.config.ts
Notes:
npm run build && npm run start)Describe the bug
After
build.publicPathinnuxt.config.tsis changed to any URL, the whole application (pages and assets) will return a 404 error. Changing it to a single folder name, no errors occur.Additional context
As of my understanding, changing
build.publicPathto a CDN URL would make all assets go into the.output/publicfolder instead of the.output/public/_nuxtfolder. The assets are actually there, but navigating to them also returns a 404 error.Logs
No response