Hello again everyone!
I'll start by apologizing for the somewhat off-topic question, I've sadly not gotten any responses about this elsewhere and I figured someone here might at least be able to point me in the right direction
I'm writing an Electron application. To be able to easily tell what's going on, the app logs various things in various places. Problem is, in the Backend (where most of the logic happens), it's not that easy to tell where a message came from. Thus, I'd like to be able to do the following: Assume I have a file src/foo.ts. When writing
...
// Line 45 below
console.log('__filename', '__lineno')
...
I'd like to have my bundler modify that line so it reads
console.log('src/foo.ts', '45')
I'm using Vite to transpile code to JS, but I've been unable to find any tools/plugins that can do this. I'm not originally from a TypeScript background, sorry if this is just the "wrong" approach entirely!