We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d953536 commit e3ef9f4Copy full SHA for e3ef9f4
packages/vite/src/node/server/pluginContainer.ts
@@ -385,13 +385,8 @@ export async function createPluginContainer(
385
if (ctx._activeCode) {
386
err.pluginCode = ctx._activeCode
387
388
- const pos =
389
- position != null
390
- ? position
391
- : err.pos != null
392
- ? err.pos
393
- : // some rollup plugins, e.g. json, sets position instead of pos
394
- (err as any).position
+ // some rollup plugins, e.g. json, sets err.position instead of err.pos
+ const pos = position ?? err.pos ?? (err as any).position
395
396
if (pos != null) {
397
let errLocation
0 commit comments