Error: SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.
detail
with initial debugging , I found the "file" property in optional is undefined,
in applySourceMap method , it need 2 argument .
Optional. The filename of the source file. If omitted, SourceMapConsumer's file property will be used.
@param sourceFile
Optional. The filename of the source file. If omitted, SourceMapConsumer's file property will be used.
The plugin use @swc/core to translate , The SOURcemap generated by SWC does not contain the file property
Error: SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.
at SourceMapGenerator.applySourceMap (H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\source-map@0.7.3\node_modules\source-map\lib\source-map-generator.js:181:15)
at H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:1854:25
at async Promise.all (index 0)
at async PluginContainer.buildFinished (H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:1843:5)
at async runEsbuild (H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:1722:5)
at async H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:2082:13
at async Promise.all (index 0)
at async buildAll (H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:2072:9)
at async H:\ds\esbuild-web-app-scaffold\node_modules\.pnpm\tsup@5.11.6_ts-node@10.4.0\node_modules\tsup\dist\index.js:2128:7
at async Promise.all (index 0)
ELIFECYCLE Command failed with exit code 1.
issue: The es5 plugin run with error
Error: SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.
detail
with initial debugging , I found the "file" property in optional is undefined, in applySourceMap method , it need 2 argument .
The plugin use
@swc/core
to translate , The SOURcemap generated by SWC does not contain the file property