Browse Source

fix(): 框架依赖修改

tags/PMS_Frontend_v1.0.6-develop
fengxiang 2 years ago
parent
commit
d0fd4e7ee8
  1. 1
      package.json
  2. 7
      scripts/webpack.common.js
  3. 4
      src/router/index.jsx

1
package.json

@ -28,6 +28,7 @@
"antd": "^4.21.4",
"autoprefixer": "^10.4.2",
"babel-loader": "^8.2.3",
"clean-webpack-plugin":"^4.0.0",
"copy-webpack-plugin": "^9.1.0",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",

7
scripts/webpack.common.js

@ -1,9 +1,16 @@
const path = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin")
const ProgressBarPlugin = require("progress-bar-webpack-plugin")
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
const isDevelopment = process.env.NODE_ENV === "development"
// 清理缓存,避免本地缓存越来越大
if (isDevelopment) {
const cachePath = path.resolve(__dirname,"../node_modules/.cache")
new CleanWebpackPlugin().removeFiles([cachePath])
}
const outputPath = (function () {
return path.resolve(__dirname, "../dist")
})()

4
src/router/index.jsx

@ -93,6 +93,10 @@ function RouterMap(props) {
useEffect(()=>{
setZoom()
window.addEventListener("resize",setZoom);
return () => {
window.removeEventListener("resize",setZoom);
}
},[])

Loading…
Cancel
Save