Describe the bug
Yet another very minor stack trace issue. It's likely due to "use strict" appended on runtime side evaluation. Recording it here so I have a place to point to for one test failure on oxc module runner vitejs#85.
throw new Error('__TEST__')
import { createServerModuleRunner } from "vite";
import { createServer } from "vite";
async function main() {
const server = await createServer({ configFile: false})
const runner = createServerModuleRunner(server.environments.ssr, {
// same issues for any interceptor
sourcemapInterceptor: "prepareStackTrace"
});
await runner.import(process.argv[2]);
}
main()
On Node:
$ node repro3.js
file:///dir/repro3.js:1
throw new Error('__TEST__')
^
Error: __TEST__
at file:///dir/repro3.js:1:7
On Vite:
$ node vite2.js repro3.js
[vite] connected.
/dir/repro3.js:3 <-- ❓ (probably rewriting this is not supported or node's bug)
"use strict";throw new Error('__TEST__')
^
Error: __TEST__
at /dir/repro3.js:1:18 <-- ❓❓
Reproduction
https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/oxc-source-map-call-stack-column?file=README.md
Steps to reproduce
Download stackblitz and test it locally
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
vite: ^6.2.1 => 6.2.1
Used Package Manager
npm
Logs
No response
Validations
Describe the bug
Yet another very minor stack trace issue. It's likely due to
"use strict"appended on runtime side evaluation. Recording it here so I have a place to point to for one test failure on oxc module runner vitejs#85.On Node:
On Vite:
Reproduction
https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/oxc-source-map-call-stack-column?file=README.md
Steps to reproduce
Download stackblitz and test it locally
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vite: ^6.2.1 => 6.2.1Used Package Manager
npm
Logs
No response
Validations