There are some useless files in webpack package.

problem description

some JS appears in my webpack package, although it is not big, but it adds up to become very big. I don"t know where these things come from

related codes

this is the common component of my webpack packaged package.JSON vendor.JS
"dependencies": {

"antd": "^3.6.2",
"babel-polyfill": "^6.26.0",
"isomorphic-fetch": "^2.2.1",
"mobx": "^5.0.0",
"mobx-react": "^5.2.3",
"prop-types": "^15.6.1",
"query-string": "^6.1.0",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-router-dom": "^4.2.2", 
"spark-md5": "^3.0.0",
"video-react": "^0.11.2"

}

take a picture of the analysis after packing, it is easier to be obvious


these are used directly or indirectly in your project, there is no need to say .

for example, rc-calendar is a library that antd depends on.

for example, core-js is the content of babel-polyfill

and so on.


are all dependencies.
antd is not configured to introduce on demand


if you don't want to pack so many js in, you can consider external CDN references. That is, remove the related dependencies in the dependencies configuration and introduce js into

through the script tag of index.html.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38418-2c0f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38418-2c0f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?