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

Already on GitHub? Sign in to your account

External sourcemaps #26

Open
fluidblue opened this Issue Jul 4, 2013 · 8 comments

Comments

Projects
None yet
4 participants

Please consider adding support for external sourcemaps.
In detail: Create both out.js and out.js.map with something like

webmake --sourcemap out.js.map in.js out.js

External sourcemaps are needed for postprocessing the output of webmake, e.g. with uglifyjs.

uglifyjs webmake-out.js --source-map out.js.map --in-source-map webmake-out.js.amp > uglifyjs-out.js

uglifyjs takes an input sourcemap with the --in-source-map option.

Additionally, external sourcemaps should make the "eval" statements (containing code and sourcemaps) unnecessary.

Owner

medikoo commented Jul 4, 2013

@fluidblue if it's possible then I'm totally open for it.

Problem is that I'm not sure how to produce one sourcemap for a bundle which is build from not one but many files. Do you know how to construct such?

Unfortunately no. Hopefully someone having the knowledge will read this issue..

However it seems possible: e.g. browserify combines all sourcemaps to a single sourcemap which is then included once at the bottom. So if it is possible to combine the sourcemaps, it is also possible to write them to a file instead of appending them directly..

Owner

medikoo commented Jul 5, 2013

Thanks, I look into that

@ghost ghost assigned medikoo Jul 24, 2013

If this is implemented, it would be possible to create bundles that didn't use eval. It would be nice if webmake could also accept external sourcemaps as input, to allow sourcemaps to work with precompiled files included from 3rd party packages.

Owner

medikoo commented Mar 10, 2014

Yes, it's in plans, however demands some bigger reorganization in Webmake, still it's likely I will do that within next month

Any update on this? This would be really helpful.

Owner

medikoo commented Oct 15, 2014

@joeyespo it'll be done, but not any time soon. I have scheduled refactor of this utility, after that it'll be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment