fix(nuxt): Use correct server output file path#13725
Conversation
e8ee328 to
7813a0a
Compare
Lms24
left a comment
There was a problem hiding this comment.
LGTM! I guess we're implicitly testing this already in the e2e test with our current nitro preset, right?
| nitro.hooks.hook('close', async () => { | ||
| const rootDirResolver = createResolver(nitro.options.rootDir); | ||
| const serverDirResolver = createResolver(nitro.options.output.serverDir); | ||
| const source = rootDirResolver.resolve('.nuxt/dist/server/sentry.server.config.mjs'); |
There was a problem hiding this comment.
In SolidStart, I can get the build directory via nitro.options.buildDir, does Nuxt's nitro config not have that exposed?
Sadly not, as the setup in the E2E test is still with the file in the public folder (the nft resolution did not work in the package.json). But I'll try to fix that problem in another PR. Edit: Just tried it but our setup somehow confuses pnpm and the override/resolution is ignored. The version of nft is always 0.26 (not 0.27) in the lock file For this PR, I tested every preset manually. |
Depending on the nitro preset, the build output changes. By using the
serverDiroption, the directory can be retrieved dynamically.