-
Notifications
You must be signed in to change notification settings - Fork 12k
Add option for hidden-source-map to use with ng build --prod #7527
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
Comments
Any update on this? I have no way of doing builds with hidden source maps so I can upload them to sentry.io. |
@cburger - if it's helpful, as a workaround what we do is have a script in package.json which runs ng build then immediately moves the sourcemaps out of |
Thank you @matt-senseye . Yes, this is pretty much what I am doing at the moment. I exclude the mappings when I do the rsync to the server. Angular just keeps throwing a warning in the console because it can't find the mappings. Would be better to do the build correctly. Another solution would have been to escape Angular CLI to edit the Webpack config, but that is also no longer supported. |
…ps (#13062) * feat(@angular/cli): update schema to match new `sourceMap` * feat(@angular-devkit/build-angular): fine grain settings for sourceMaps This PR add more control over which sourceMaps you want, Now you can enable sourceMaps for scripts only, styles only or both. Also we added another functionality which are hidden sourcemaps. These are normaly used for error reporting tools. Fixes #7527
Is there an example of this somewhere? How to use the fine grain settings (e.g. hidden) via commandline? |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
1.4.0-rc2
Repro steps.
Feature
The log given by the failure.
Feature
Desired functionality.
Add an option to generate hidden source maps for production builds. Hidden source maps are helpful because they are full source maps, but not referenced in the minified files. This allows a developer to use the source maps for debugging purposes without letting the browser know they exist. Error tracking sites such as Atatus allow users to upload source maps manually so the stack traces are more useful and the maps never need to be made public.
In my case, I have modified my fork of the cli to generate hidden source maps when using the production build and source-maps=true. This has worked for me, but I didn't expect it would be the best fit for the whole project.
https://github.com/mhamel06/angular-cli/blob/2f551150bccdeb6121c79f0b1fd65bfdd68c33ce/packages/%40angular/cli/models/webpack-configs/production.ts#L108-L110
Mention any other details that might be useful.
https://webpack.js.org/configuration/devtool/
The text was updated successfully, but these errors were encountered: