While using sv2pdf in a project, I faced a Failed to parse source map
error. I found this solution and now it's resolved. The solution was to just add GENERATE_SOURCEMAP=false
to the .env
file.
However, I am not sure about the possible side effects of this solution. According to the official Create React App docs, it is ignored while in development
yet used in production
. Am I risking something by using this?
While using sv2pdf in a project, I faced a Failed to parse source map
error. I found this solution and now it's resolved. The solution was to just add GENERATE_SOURCEMAP=false
to the .env
file.
However, I am not sure about the possible side effects of this solution. According to the official Create React App docs, it is ignored while in development
yet used in production
. Am I risking something by using this?
1 Answer
Reset to default 5A source map is a file that maps from the transformed source to the original source, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger. Mozilla
When the GENERATE_SOURCEMAP
is enabled a full copy of your app's source code is bundled alongside the "minified" / "transpiled" version of JS files.
If you enable this (GENERATE_SOURCEMAP=true
), the original source files will be visible to your app's visitors using tools like browser "Dev Tools".
And if you turn it off (GENERATE_SOURCEMAP=false
), it won't create the source map files when you build
your project (source maps are generated by default in production mode in CRA).