-
Notifications
You must be signed in to change notification settings - Fork 12k
Ability to configure output path for source maps #13508
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
Hi, What is the usecase of not deploying the sourcemaps? If it’s for reporting purposes I suggest you use the ‘hidden` sourcemap which have been added recently see here #13062 |
Thanks for reporting this issue Closing as Thanks. |
A use case would be using "hidden" sourcemaps on a production deployment. You would name the subfolder under dist something secret, then add the sourcemaps when you want to debug the production deploy using that URL subdirectory. |
Hi @johnhamm, why would you want to deploy your sourcemaps in a 'secret' folder instead of using the There is quite a good article about this in https://blog.angularindepth.com/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85 |
The article you linked to explains why:
You'd still use the hidden feature, but you'd move the source maps to a subfolder which you would publish along with the website into a subdirectory name. The advantages are obvious - the developer doesn't have to find the matching commit, generate the sourcemaps, and upload them. Instead, they can merely add them using the subdirectory from whatever deploy they are accessing. |
There's no need to move them. Instead, just don't deploy the source map files. |
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. |
🚀 Feature request
Ability to configure output path for source maps
Command (mark with an
x
)Description
When I create a production build using
ng build -prod --sourcemaps
,I would like the ability to configure the output path for the source map files,
So that my source maps will not be deployed with my application.
Describe the solution you'd like
A dedicated --source-map-output-path build command to configure the output path of the source maps only.
The output of the build should continue to go to --output-path=./dist
The source maps should go to the path specified by --source-map-output-path
Describe alternatives you've considered
The current solution is a post-build script that moves the *.map files from the --output-path=./dist directory into a different target directory.
The text was updated successfully, but these errors were encountered: