Commit 04bbea2c authored by Tim Neutkens's avatar Tim Neutkens

Add sourceFileName for SWC compiled core files

Fixes the vscode debugger breakpoints. Thanks @kdy1 for implementing the `sourceFileName` option in SWC.
parent e57b959e
......@@ -74,9 +74,14 @@ module.exports = function (task) {
const swcOptions = isClient ? swcClientOptions : swcServerOptions
const filePath = path.join(file.dir, file.base)
const fullFilePath = path.join(__dirname, filePath)
const distFilePath = path.dirname(path.join(__dirname, 'dist', filePath))
const options = {
filename: path.join(file.dir, file.base),
sourceMaps: true,
sourceFileName: path.relative(distFilePath, fullFilePath),
...swcOptions,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment