Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxt): pass fully resolved path to nitro dist files #7494

Merged
merged 11 commits into from
Sep 15, 2022
3 changes: 2 additions & 1 deletion packages/nuxt/src/core/nitro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export async function initNitro (nuxt: Nuxt) {
nuxt.options.buildDir
]),
'nuxt/dist',
'nuxt3/dist'
'nuxt3/dist',
distDir
danielroe marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to exclude dist dir for prerender (will come with another PR if needed)

]
},
alias: {
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export async function buildServer (ctx: ViteBuildContext) {
/\.(es|esm|esm-browser|esm-bundler).js$/,
'/__vue-jsx',
'#app',
/(nuxt|nuxt3)\/(dist|src|app)/,
/@nuxt\/nitro\/(dist|src)/
/^nuxt(\/|$)/,
/(nuxt|nuxt3)\/(dist|src|app)/
danielroe marked this conversation as resolved.
Show resolved Hide resolved
]
},
build: {
Expand Down