karolis-sh / electron-snowpack

Use Snowpack and esbuild for Electron app development
MIT License
50 stars 8 forks source link

Set sourcemap option in dev esbuild configuration #65

Closed giohappy closed 2 years ago

giohappy commented 2 years ago

I was struggling with VSCode debuggin of the main process. Finally I've discovered that all that was needed was configuring the sourcemap inside the esbuild configuration.

I've added sourcemap = 'inline' to the options parameter for getESBuildConfig inside the dev command and it worked like a charm.

karolis-sh commented 2 years ago

Wouldn't it work with true (linked, https://esbuild.github.io/api/#sourcemap)? I think inline might not be that efficient 🤔

Maybe you could share the launch.json? I am not sure how to attack debugger to the CLI

giohappy commented 2 years ago

I haven't tried true but it should work too and I agree it would probably be more efficient.

karolis-sh commented 2 years ago

Released in 0.13.0