fusionjs / fusion-cli

Migrated to https://github.com/fusionjs/fusionjs
MIT License
140 stars 37 forks source link

Allow configuring 'source-map' instead of 'hidden-source-map' for production builds. #763

Open lxe opened 5 years ago

lxe commented 5 years ago

Fusion-cli correctly .map files for production builds, but uses hidden-source-map webpack config, which omits the //# sourceMappingURL comment at the end of the source files.

From https://webpack.js.org/configuration/devtool/:

hidden-source-map - Same as source-map, but doesn't add a reference comment to the bundle. Useful if you only want SourceMaps to map error stack traces from error reports, but don't want to expose your SourceMap for the browser development tools.

For many projects, it's useful to expose hidden source maps to devtools to allow debugging in production.

I'd like to propose an option to use 'source-map' instead if 'hidden-source-map'

mlmorg commented 5 years ago

Sounds good. Could you put up a PR for this?