I am using create-react-app for my project. My src folder is 600KB in size. Here are the dependencies for the project.
"devDependencies": { "eslint": "3.12.2", "eslint-config-standard": "6.2.1", "eslint-plugin-promise": "3.4.0", "eslint-plugin-react": "6.8.0", "eslint-plugin-standard": "2.0.1", "react-scripts": "0.8.4", "react-svg-inline": "1.2.0" }, "dependencies": { "axios": "0.15.3", "chart.js": "2.4.0", "clipboard": "1.5.16", "jwt-decode": "^2.1.0", "moment": "2.17.1", "react": "15.4.1", "react-chartjs-2": "2.0.0", "react-copy-to-clipboard": "4.2.3", "react-datepicker": "0.40.0", "react-dom": "15.4.1", "react-dropdown": "1.2.0", "react-highlight": "0.9.0", "react-ladda": "5.0.5", "react-redux": "5.0.1", "react-redux-loading-bar": "2.6.5", "react-router": "3.0.0", "react-router-redux": "4.0.7", "react-select": "1.0.0-rc.3", "react-spinner": "0.2.6", "react-tap-event-plugin": "2.0.1", "redux": "3.6.0", "redux-thunk": "2.1.0", "react-dropzone": "3.11.0" }, When I build, I notice that the generated JS bundle is about 1.7MB. I can't figure it out. Why is the JS bundle so large when the entire source folder is just 600KB including images and other assets?
devtooloption in your Webpack configuration? If so, some values for that option may cause the bundle to become quite large, because they include the source map in the bundle itself.du -sh ./node_modulesin the root folder of your project and paste the reported size.node_modulescontains about 170MB but the bundle size is about 800KB