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

@babel/runtime 版本是否可以改为 7.x? #12803

Open
afc163 opened this issue Nov 25, 2024 · 1 comment
Open

@babel/runtime 版本是否可以改为 7.x? #12803

afc163 opened this issue Nov 25, 2024 · 1 comment

Comments

@afc163
Copy link
Contributor

afc163 commented Nov 25, 2024

目前是写死的,容易和应用自身的 @babel/runtime 依赖声明产生多版本,增加不必要的体积:

"@babel/runtime": "7.23.6",

比如这里:https://github.com/ant-design/x/actions/runs/12002837217/job/33455385061?pr=229

error - Error: @babel/runtime
  Multiple versions of @babel/runtime found:
    7.23.6 ./~/@umijs/babel-preset-umi/~/@babel/runtime from ./components/sender/index.tsx
    7.26.0 ./~/@babel/runtime from ./~/rc-util/lib/pickAttrs.js

Check how you can resolve duplicate packages: 
https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle

    at /home/runner/work/x/x/node_modules/@madccc/duplicate-package-checker-webpack-plugin/lib/index.js:187:18
    at Array.map (<anonymous>)
    at /home/runner/work/x/x/node_modules/@madccc/duplicate-package-checker-webpack-plugin/lib/index.js:169:27
    at _next0 (eval at create (/home/runner/work/x/x/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7744), <anonymous>:8:1)
    at eval (eval at create (/home/runner/work/x/x/node_modules/@umijs/bundler-utils/compiled/tapable/index.js:1:7744), <anonymous>:23:1)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error: script "compile" exited with code 1
Error: Process completed with exit code 1.

@babel/runtime 本身好像没出现过问题,是否有必要锁死?

@Jinbao1001
Copy link
Member

let me cc

@afc163 afc163 changed the title @babel/runtime 版本改为 7.x @babel/runtime 版本是否可以改为 7.x? Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants