Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

0.13.2 版本的 biz 模块引入错误 #37

Closed
furybean opened this issue May 20, 2020 · 3 comments
Closed

0.13.2 版本的 biz 模块引入错误 #37

furybean opened this issue May 20, 2020 · 3 comments

Comments

@furybean
Copy link

furybean commented May 20, 2020

本地做了个最小重现案例,使用的 umi 的最新版本来使用 ali-react-table。

import { applyTransforms, commonTransforms, SortItem } from 'ali-react-table/biz' 会出现编译错误:

error in ./node_modules/ali-react-table/dist/ali-react-table-biz.esm.js Module parse failed: Identifier 'treeMode' has already been declared (6:64) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders | import { a as isLeafNode, g as getTreeDepth, c as collectNodes, e as safeGetValue, d as safeGetCellProps, n as SpanManager, o as safeRenderHeader, p as STYLED_VERSION } from './chunks/ali-react-table-SpanManager-71d11259.esm.js'; | import styled__default from 'styled-components'; > import { f as flatMap, t as treeMode, a as treeMetaSymbol, b as treeMode, _ as __rest } from './chunks/ali-react-table-_tslib-1b7235e4.esm.js'; | import { Number_116, Number_216, Number_316, Number_416, Number_516, Number_616, Number_716, Number_816, Number_916, Information16, Column16, Download16 } from '@carbon/icons-react'; | @ ./src/pages/index.tsx 6:0-54 9:32-47 @ ./src/.umi/core/routes.ts @ ./src/.umi/umi.ts @ multi ./src/.umi/umi.ts

做了另外两个测试:

  1. 只引入 import { ArtColumn, BaseTable } from 'ali-react-table' ,不会报错。
  2. 使用 0.13.1 版本引入 ali-react-table/biz,不会报错。

也就是说,这应该是 0.13.2 新引入的一个 Bug。

@feichao93
Copy link
Collaborator

多谢提醒。0.13.2 触发了 rollup 的bug rollup/rollup#2737 我看下怎么绕过去

@feichao93
Copy link
Collaborator

已经在 0.13.3 解决这个问题了

@furybean
Copy link
Author

0.13.3 确认解决了。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants