We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccd50bc commit 891a1a6Copy full SHA for 891a1a6
server/plugins/static-assets.ts
@@ -24,9 +24,9 @@ export default defineNitroPlugin((nitroApp) => {
24
// Get the file path - remove /_nuxt/ prefix
25
const filePath = url.replace('/_nuxt/', '')
26
27
- // During preview, Nitro runs from .output/ directory
28
- // So process.cwd() is already .output/, so we use public/_nuxt/
29
- const outputPath = join(process.cwd(), 'public/_nuxt', filePath)
+ // In production, PM2 runs from the project root, not .output/
+ // So we need to go to .output/public/_nuxt/ from the project root
+ const outputPath = join(process.cwd(), '.output/public/_nuxt', filePath)
30
31
console.log('[Static Assets Plugin] Looking for file at:', outputPath)
32
0 commit comments