javascript - React table 在构建中给出空表

标签 javascript reactjs build react-router react-table

这是一个非常奇怪的问题,但我使用的是 react-table 7.0.0.rc16 并且我最近升级到 react-table 7.0.1 问题是我的数据在开发模式下工作但是一旦我创建了一个 react 构建它就不会渲染任何东西我想知道为什么,我也附上了我的 package.json。
sandbox
Demo
包.json

{
  "name": "test",
  "homepage": "http://www.test.com",
  "version": "0.0.0",
  "private": true,
  "dependencies": {
    "@date-io/date-fns": "^1.3.11",
    "@material-ui/core": "^4.4.2",
    "@material-ui/icons": "^4.4.3",
    "@material-ui/lab": "^4.0.0-alpha.39",
    "@material-ui/pickers": "^3.2.6",
    "bootstrap": "^4.4.1",
    "classnames": "^2.2.6",
    "date-fns": "^2.9.0",
    "echarts": "4.2.1",
    "echarts-for-react": "^2.0.15-beta.0",
    "formik": "^1.5.8",
    "formik-material-ui": "^0.0.22",
    "google-map-react": "^1.1.5",
    "i18next": "^17.0.18",
    "i18next-browser-languagedetector": "^4.0.0",
    "i18next-xhr-backend": "^3.2.0",
    "immutable": "^4.0.0-rc.12",
    "node-sass": "^4.12.0",
    "prop-types": "^15.6.1",
    "react": "^16.9.0",
    "react-csv": "^2.0.3",
    "react-custom-scrollbars": "^4.2.1",
    "react-d3-tree": "^1.16.1",
    "react-dom": "^16.9.0",
    "react-google-maps": "^9.4.5",
    "react-i18next": "^10.13.1",
    "react-redux": "^7.1.1",
    "react-router-dom": "^5.1.2",
    "react-scripts": "^2.0.3",
    "react-table": "7.0.1",
    "redux": "^4.0.4",
    "redux-saga": "^1.1.3",
    "yup": "^0.27.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "watch": "react-scripts start --watch",
    "build": "CI=false react-scripts --expose-gc --max-old-space-size=4096 build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject",
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
  "devDependencies": {
    "eslint-config-prettier": "^6.4.0",
    "eslint-plugin-prettier": "^3.1.1",
    "prettier": "^1.18.2"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}
包-lock.json 也附加为 file
table 的图像
image of table when doing prod build
我正在使用节点 v10.23.1 和 npm 6.14.10。

最佳答案

这是 react-table v7.0.1 的问题,升级到 v7.0.2 可以解决问题。
这是一个缩小错误。这是确切的commit解决了这个问题。
从变更日志:

7.0.2

  • Fixed an issue where the internal flexRenderer would not work correctly in production due to the strangest friggin' minification bug I've ever encountered. 🤷‍♂️

关于javascript - React table 在构建中给出空表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65953709/

相关文章:

map 中的 Javascript 变量评估

javascript - Firebase 实时数据库触发太多更新事件

javascript - Highcharts - 如何在全局范围内为每种类型的图表设置渐变主题?

css - 带有 webpack 的 React 本质样式表为 14mb

build - 从Bamboo REST API获取应用程序的构建统计信息

ios - 为什么我不能为某些特定的 iOS 模拟器构建?

tfs - Visual Studio 解决方案中的多种语言

javascript - webEngine.executeScript();抛出异常

reactjs - Next.js:在 getStaticProps 中使用 "revalidate"选项和使用 SWR 包有什么区别?

java - 从 java 执行 javascript 函数