我现在正在学习React并构建一个处于婴儿期的应用程序,但我打算提供帮助。我发现,我的bundle.js文件增长很快,我不知道为什么。我认为即使是中等规模的网络应用也不会超过js。
当我添加'时刻'时,我注意到了一个大的跳跃。然后'随机密钥'和' recharts'很大的补充。使用带有-p的webpack可以得到大约1.2Meg的bundle.js,而没有-p,我看着3.5meg。
我认为我正在破坏我的devDependencies和我的依赖关系。你怎么知道devDependency(--save-dev)和依赖(--save)应该是什么?
查看下面的列表,我应该移动一下吗?
"license": "ISC",
"dependencies": {
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^0.28.7",
"file-loader": "^1.1.5",
"html-webpack-plugin": "^3.0.6",
"moment": "^2.21.0",
"random-key": "^0.3.2",
"react-modal": "^3.3.2",
"react-moment": "^0.7.0",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-toastify": "^3.4.2",
"recharts": "^1.0.0-beta.10",
"redux": "^3.7.2",
"style-loader": "^0.19.0",
"svg-react-loader": "^0.4.5",
"url-loader": "^0.6.2",
"webpack": "^3.10.0",
"webpack-dev-server": "^2.9.7"
}
应该移动/移除哪些内容,以及如何决定每组应该采取什么措施?