Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set babel sourcemap option to inline when debug #62

Closed
wants to merge 1 commit into from

Conversation

zaaack
Copy link
Contributor

@zaaack zaaack commented Jul 7, 2017

For debug.

@zaaack
Copy link
Contributor Author

zaaack commented Jul 8, 2017

#60

@tyronedougherty
Copy link

tyronedougherty commented Jul 10, 2017

This PR fixes my issue (#60), would strongly like a merge! It fixes the debug mode so you can use a debugger on it. Thanks @zaaack !

cc @kmagiera

@kmagiera
Copy link
Owner

@zaaack @tyronedougherty I'd prefer for that setting to be optional or maybe only enable that when debugging flags are set? I'm afraid that this may cause a perf regression on larger projects as embedding sourcemaps often have significant impact on the file size

@zaaack
Copy link
Contributor Author

zaaack commented Jul 10, 2017

@kmagiera You are right, I'll update this as soon as possible.

@zaaack zaaack changed the title Change babel sourcemap option to 'inline' Add babel sourcemap option Jul 10, 2017
@zaaack
Copy link
Contributor Author

zaaack commented Jul 10, 2017

@kmagiera @tyronedougherty Done.

@zaaack zaaack force-pushed the patch-1 branch 2 times, most recently from bac4eed to 04d7eba Compare July 10, 2017 13:33
@kmagiera
Copy link
Owner

@zaaack sorry for holding this off again but I guess I wasn't clear enough the last time.

So what I meant is that we should associate the sourceMaps option set with babel with debug command line options of babel-watch. I understand that the usecase for when the sourcemaps need to be inlined is when you run the app in debug mode, no?

I don't think allowing users to change source maps to false is something we want to do. Doing that would make it impossible to get a meaningful stack trace.

Also I realised that in the "client process" code we override uncaught handler so that the sourcemaps can be fetched from the "host process". I think this would need to be adjusted for the case when sourcemaps are inlined.

@zaaack zaaack changed the title Add babel sourcemap option Set babel sourcemap option to inline when debug Jul 11, 2017
@zaaack
Copy link
Contributor Author

zaaack commented Jul 11, 2017

@kmagiera Updated. I think I get what you mean... Looks like node-source-map-support has a option to support inline source map. Hoping I didn't make mistake.

https://github.com/evanw/node-source-map-support#options

@tyronedougherty
Copy link

Why hasn't this been merged? :S

STRML pushed a commit that referenced this pull request Jan 5, 2021
* Set babel sourcemap option to inline when debug

* Add missing `inspectBrk` to the `debug` list

Co-authored-by: zaaack <zaaack@qq.com>
@STRML
Copy link
Collaborator

STRML commented Jan 5, 2021

Closing in favor of #118

@STRML STRML closed this Jan 5, 2021
STRML added a commit that referenced this pull request Jan 5, 2021
@STRML
Copy link
Collaborator

STRML commented Jan 5, 2021

Released in 7.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants