Skip to content
Discussion options

You must be logged in to vote

确保你的打包工具识别 package.jsonexportspeerDependenciesMeta 关键字, @antv/g2 是可选依赖, 只有使用 @antv/s2/extends 才需要, 看起来是你的打包工具不支持, 实在不行可以额外安装下 @antv/g2

  "exports": {
    ".": {
      "import": "./esm/index.js",
      "require": "./lib/index.js"
    },
    "./extends": {
      "import": "./esm/extends/index.js",
      "require": "./lib/extends/index.js"
    },
    "./*": "./*"
  },
  "peerDependencies": {
    "@antv/g2": ">=5.1.21"
  },
  "peerDependenciesMeta": {
    "@antv/g2": {
      "optional": true
    }
  },

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by gb853940223
Comment options

You must be logged in to vote
1 reply
@Alexzjt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants