Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I deploy the **.css.map/**.js.map files for a react web site?

I'm playing with create-react-app and have run:

npm run build

after that I got

The build folder is ready to be deployed.

But when I checked my build folder, I see main.**.css.map and main.**.js.map files inside.

I guess there are for debug only, should I deploy them as well?

like image 488
Felix Avatar asked Sep 13 '25 18:09

Felix


1 Answers

No, you don't have to deploy them if you don't want to debug your app in production. Those are source map files and as you guessed using those files you can see where the error is coming from. Without them, it will be seen as coming from your bundled, minified, uglified file.

like image 153
devserkan Avatar answered Sep 16 '25 07:09

devserkan