-
Notifications
You must be signed in to change notification settings - Fork 86
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
browserify with --source-maps? #208
Comments
When you run @nwolverson has very helpfully put together a summary of a few options: https://github.com/nwolverson/purescript-sourcemap-test (@nwolverson do you know if what is written there is still accurate?) |
Yes, the bottom line is that psc-bundle doesn't support source maps, so I'm not likely to add source map support to psc-bundle any time soon unless it turns out to be surprisingly easy. |
Great, thanks. Do you think it's worth adding an issue to the compiler's issue tracker for source map support for psc-bundle, even so? There's a chance that someone else might pick it up, I guess? |
Yes, that would make sense. |
Closing now that this is tracked at purescript/purescript#2096. |
@hdgarrood Starting from v0.10.4
Looking at code I'm wondering why not to pass |
@AndreyNe think it's more complicated than that, I was going to make changes for pulp but it seemed like there were rollup related changes happening. pulp needs to pass |
Have there been any changes regarding this? |
For there to be progress here someone needs to do some investigation to see how pulp would expose this functionality. It's not something I've needed so I'm unlikely to look at it myself any time soon, but if someone wants to investigate it I'd certainly consider changes to enable this. |
I would add a If that sounds reasonable I might eventually get to it but it won't be in the next few weeks (would be happy to be beaten to it). |
That all sounds fine, except that I'm a bit apprehensive about using |
To be fair it continues on to say "don't rely on it to debug air traffic control software or medical equipment" which I think sets the tone. I've had a quick search and don't see anything more mature (suggestions welcome, I saw https://github.com/jvilk/merge-source-maps https://github.com/thlorenz/combine-source-map https://www.npmjs.com/package/sourceify (browserify specific)), much seems to be integrated with grunt/gulp or more by way of taking input source maps to another transform to manipulate (eg uglify does this, I think webpack too). In terms of map quality it would remain to be seen if issues stem from the additional transformations/combining maps or the original source maps - probably adding support to pulp would surface any issues as it gets easier to use. |
Ok, fair enough. I guess if a source map does come out slightly wrong it's not the end of the world anyway. |
I came across this issue for other pass-through options. I'm working on getting https://github.com/quicktype/quicktype to use the simple DCE that
… to:
... has it whinge about these extra options, because the entire set is being given to both I tend to prefer strict pass-through (having Pulp be aware of every option and then passing them through) to prevent this sort of thing, but I understand that having it like this allows Pulp to support compiler changes / versions without chasing after each individual combination. I just don't really know an alternative, outside of |
Hi,
I'm new to purescript/pulp and trying it out.
I see that you can now do a pulp build with --source-maps.
That builds the node javascript.
Now, I'd like to build purescript to run in the browser.
That works but I don't seem to be able to use --source-maps with --to. How would you compile optimized purescript with sourcemaps to be run in a browser?
Thanks,
Kerry
The text was updated successfully, but these errors were encountered: