Reputation: 81
I'm trying to build and debug svelte source code to learn svelte internal better.
The code runs as expected. The problem appears when I use the svelte compiler on a plain old JavaScript file and trying to debug it with VSCode.
It seems that the debugger fails to read the source map file.
The debugger highlights / read compiler.js (compiled one) but I want to debug the .ts one instead of the compiled file.
Here's the code :
// playsv.js
const sv = require('./compiler')
const str = '<h1>text</h1>'
// get ast
const ast = sv.parse(str)
Thanks
Upvotes: 3
Views: 1486
Reputation: 81
Based on @UnLoCo answer.
I have to do is:
sveltejs/svelte
npm run build
npm link
npm link svelte
Upvotes: 3