Skip to content

Commit

Permalink
fix: @babel/runtime/regeneratorRuntime import path
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 23, 2022
1 parent 30cfdda commit 36145a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/getBabelCommonConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module.exports = function (modules) {
resolve('@babel/plugin-transform-runtime'),
{
useESModules: modules === false,
version: '^7.10.4',
version:
require(`${process.cwd()}/package.json`).dependencies['@babel/runtime'] || '^7.10.4',

This comment has been minimized.

Copy link
@vagusX

vagusX Jun 23, 2022

Member

要 try catch 吧,require 万一文件不存在

This comment has been minimized.

Copy link
@afc163

afc163 Jun 23, 2022

Author Member

也就 antd 用,挂了也比 catch 住好。

},
],
resolve('@babel/plugin-transform-spread'),
Expand Down

0 comments on commit 36145a7

Please sign in to comment.