alibaba / alibaba/cloud-charts

@alife/aisc-widgets 依赖问题

Open
#20 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
513
Forks
75
PR merge metrics
No merged PRs in 30d

Description

@alife/aisc-widgets 依赖 d3-composite-projections,但d3-composite-projections 在其 package.json 里 定义了 "type": "module",实际引入的时候并没有遵守ESM的规则,构建会有报错,需要额外配置来解决。
以下两种方案可供选择:
1. webpack 引入 @babel/plugin-transform-modules-commonjs
2. 使用patch-package 为 d3-composite-projections 加上 js 后缀

Contributor guide

Open the contributing guide

Research direction

Start by checking the dependency package.json and the webpack configuration used by @alife/aisc-widgets. Compare the Babel CommonJS configuration with the patch-package alternative, then verify that the project builds successfully with d3-composite-projections.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, typescript, webpack
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.