electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 97 forks source link

feat(compileCache): emit external sourcemap if available #182

Closed kwonoj closed 7 years ago

kwonoj commented 7 years ago

This PR enables to write external source map provided by electron-compiler, if compiler is configured to emit source map externally.

To support, this PR updates signature of init() to accept source map dir as last parameter to allow custom path to store source maps, while default back to cache dir if it's not specified. Also enables one cli argument --sourcemapdir as well when someone invokes via cli.

Since this change transparently passthrough sourcemap generated by compiler, user still owns responsibility to control specifics like sourceRoot, maproot, etcs.