-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
--outfile option incompatible with current method for generating external sourcemap #996
Comments
Then don't use
especially when the docs mention exorcist already and provide a handy example. |
Perhaps this issue would have best been withheld until after #995 was resolved one way or the other. As of right now, you're right, there's absolutely nothing wrong with piping through exorcist before dumping the bundle to a file with However, if |
Not that this helps with #995. |
There are reasons why "simply piping to exorcist" is not ideal.
Both of these limitations are technically the fault of exorcist, which has steadfastly refused to address these issues: thlorenz/exorcist#22, thlorenz/exorcist#23, thlorenz/exorcist#24 Browserify could eliminate the headaches caused by exorcist by handling the sourcemap itself. In the years since browserify was created (and since this issue was first opened), plenty of other tools have popped up that all write their sourcemaps themselves. (babel and rollup to name two common ones) It is general convention now that the sourcemap be output to a file with the same name as the bundle, but with the I propose browserify follow this convention: have --debug default to external sourcemap (accepting |
I can't use
My workaround:
And when I run |
The README states that if the user would like to have their sourcemap pushed to an external file, as opposed to inlined in the bundle itself, they should use
exorcist
and pipe browserify's output throughexorcist
before writing the output file with>
.If the user makes use of the the
--outfile
(which doesn't currently offer any real benefit over>
, but would if #995 were to be accepted :cough:), then this method of generating an external sourcemap isn't an option, as browserify no longer pipes toprocess.stdout
andexorcist
has no input on which to act.It would seem that allowing browserify to directly create an external sourcemap file by either providing the
--debug
option with a filename as a value, or by adding a--debug-file
option would be useful.I don't know that this is directly resolvable within browserify, as sourcemap generation appears to be delegated to
browser-pack
, so I'm hoping that @substack or someone else equally familiar with both packages could provide some input as to whether this is possible, or if it's been discussed and rejected as a feature in the past.Thanks.
The text was updated successfully, but these errors were encountered: