Pass config file path as sourceFilename in stackConfigFileExportsConfig

Uses the previously-unused filePath param as Babel's sourceFilename so parse
diagnostics reference the real file. Addresses Copilot review note.

Co-Authored-By: mantra <mantra@stack-auth.com>
This commit is contained in:
Devin AI 2026-06-02 19:36:43 +00:00
parent b9a4f76349
commit befb70b8ae

View File

@ -120,6 +120,7 @@ export function stackConfigFileExportsConfig(content: string, filePath: string):
try {
ast = parser.parse(content, {
sourceType: "module",
sourceFilename: filePath,
plugins: ["typescript", "importAttributes"],
});
} catch {