umijs / umi

A framework in react community ✨
https://umijs.org
MIT License
15.39k stars 2.65k forks source link

umi 3.x 开启服务端渲染SSR后, 栅格组件展示问题, 部署后打开缓慢 #5283

Closed wavesbig closed 3 years ago

wavesbig commented 4 years ago

What happens?

  1. antd row col组件一开始加载会默认100% 沾满
  2. 部署后直接访问端口加载速度正常,访问代理后的加载缓慢

相关环境信息

配置信息

config.ts

export default defineConfig({
  ssr: {
    devServerRender: false,
    // mode: 'stream',
  },
  nodeModulesTransform: {
    type: 'none',
  },
  hash: true,
  publicPath: path,
  locale: false,
  title: false,
  dynamicImport: { loading: '@/components/PageLoading/index' },
  ignoreMomentLocale: true,
  routes: ....
});
package

{
  "private": true,
  "scripts": {
    "start": "node server.js",
    "build": "cross-env umi build",
    "dev": "cross-env UMI_UI=none NODE_ENV=development PORT=10086 concurrently \"umi dev\" \"nodemon server.js\"",
    "postinstall": "umi generate tmp",
    "test": "umi-test",
    "test:coverage": "umi-test --coverage",
    "lint": "umi g tmp && npm run lint:js && npm run lint:style && npm run lint:prettier",
    "lint-staged": "lint-staged",
    "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
    "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
    "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
    "lint:prettier": "check-prettier lint",
    "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
    "prettier": "prettier -c --write \"**/*\""
  },
  "gitHooks": {
    "pre-commit": "lint-staged"
  },
  "husky": {
    "hooks": {
      "pre-commit": "npm run lint-staged"
    }
  },
  "lint-staged": {
    "*.{js,jsx,less,md,json}": [
      "prettier --write"
    ],
    "*.ts?(x)": [
      "prettier --parser=typescript --write"
    ]
  },
  "dependencies": {
    "@ant-design/icons": "^4.2.2",
    "@ant-design/pro-layout": "^5.0.12",
    "@umijs/preset-react": "1.x",
    "@umijs/test": "^3.2.15",
    "ahooks": "^2.5.0",
    "antd": "^4.5.4",
    "lint-staged": "^10.0.7",
    "prettier": "^1.19.1",
    "querystring": "^0.2.0",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-helmet": "^6.1.0",
    "react-swipe": "^6.0.4",
    "swipe-js-iso": "^2.1.5",
    "swiper": "^6.1.1",
    "umi": "^3.2.16",
    "umi-request": "^1.3.5"
  },
  "devDependencies": {
    "@types/react": "^16.9.46",
    "@types/react-dom": "^16.9.8",
    "@types/react-helmet": "^6.1.0",
    "@types/react-swipe": "^6.0.0",
    "@umijs/fabric": "^2.2.2",
    "check-prettier": "^1.0.3",
    "concurrently": "^5.3.0",
    "cross-env": "^7.0.2",
    "eslint": "^7.7.0",
    "got": "^11.5.2",
    "http-proxy-middleware": "^1.0.5",
    "husky": "^4.2.5",
    "koa": "^2.13.0",
    "koa-compress": "^5.0.1",
    "koa-mount": "^4.0.0",
    "koa-static": "^5.0.0",
    "koa-websocket": "^6.0.0",
    "koa2-proxy-middleware": "^0.0.4",
    "nodemon": "^2.0.4",
    "prettier": "^1.19.1",
    "stylelint": "^13.6.1",
    "yorkie": "^2.0.0"
  }
}
github-actions[bot] commented 3 years ago

Since the issue was labeled with Need Reproduce, but no response in 3 days. This issue will be closed. If you have any questions, you can comment and reply. 由于该 issue 被标记为需要可复现步骤,却 3 天未收到回应。现关闭 issue,若有任何问题,可评论回复。