Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐️⚒ 【升级要点】G6 4.1.0 类型文件引入说明 ⚒ ⭐️ 【v4.1.0】Importing Way for Type Files is Changed #2525

Closed
baizn opened this issue Jan 7, 2021 · 0 comments
Labels
OFFICIAL Official statements

Comments

@baizn
Copy link
Contributor

baizn commented Jan 7, 2021

  • G6 Version: 4.1.0
  • Platform: Mac/Window

G6 4.0.4 之前的版本,使用类似如下的方式引入类型文件:
import { INode, IGraph } from '@antv/g6/lib/item'

为了简化类型文件的引入,在 G6 4.1.0 版本中,将类型文件的引入改成了如下方式:
import { INode, IGraph } from '@antv/g6'

对于已有的项目,如果 build 过程中报错,麻烦将 G6 类型文件的路径修改成从 @antv/g6 引入,感谢!


In G6 4.0.4 and previous version, the users could import the type files like:

import { INode, IGraph } from '@antv/g6/lib/item'

To simplify it, the previous importing way is discarded in G6 4.1.0 and later versions. Import by the following way instead pls:

import { INode, IGraph } from '@antv/g6'

If your project meet building error after upgrade the G6 to v4.1.0, just import the type files from @antv/g6 pls.

@baizn baizn pinned this issue Jan 7, 2021
@Yanyan-Wang Yanyan-Wang changed the title G6 4.1.0 类型文件引入说明 ⭐️⚒ 【官方声明-升级要点】G6 4.1.0 类型文件引入说明 ⚒ ⭐️ Jan 8, 2021
@Yanyan-Wang Yanyan-Wang added the OFFICIAL Official statements label Jan 8, 2021
@Yanyan-Wang Yanyan-Wang unpinned this issue Jan 8, 2021
@Yanyan-Wang Yanyan-Wang pinned this issue Jan 8, 2021
@Yanyan-Wang Yanyan-Wang changed the title ⭐️⚒ 【官方声明-升级要点】G6 4.1.0 类型文件引入说明 ⚒ ⭐️ ⭐️⚒ 【升级要点】G6 4.1.0 类型文件引入说明 ⚒ ⭐️ 【v4.1.0】Importing Way for Type Files is Changed Jan 8, 2021
@baizn baizn unpinned this issue Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OFFICIAL Official statements
Projects
None yet
Development

No branches or pull requests

2 participants