-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Closed as not planned
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Describe the bug
Hello there, I have a bug in a very exotic setup.
I'm running a nest application in vite with vite-plugin-node. Everything works fine for my needs, except debugging.
Let's consider the file accounts.controller.ts, with a breakpoint on line 11:
When transpiled to TypeScript, the corresponding line is line 22:
However, ssrLoadModule
produces a slightly different virtual file:
As you can see here, the breakpoint triggers on line 22 (in fact 23) and not on the right line.
Might be related to #5834.
I tried patching vite-plugin-node/server/index.ts with the following line without success.
const appModule = await server.ssrLoadModule(config.appPath, {fixStacktrace: true});
Reproduction
https://git.inpt.fr/inp-net/bonfire/-/tree/vite-issue/
System Info
vite: 2.8.6
vite-plugin-node: 0.0.18
yarn: 3.2.0 (with node_modules)
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists