From f1c79fbafa103c3fe0048b4756123d431bb92809 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 2 Jun 2023 15:33:46 +0800 Subject: [PATCH] chore: support transform optional chaining #199 --- babel.config.js | 1 + package.json | 1 + yarn.lock | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/babel.config.js b/babel.config.js index b4cc60a..27240d1 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,6 +2,7 @@ const presets = ['@babel/preset-env']; const plugins = [ '@vue/babel-plugin-jsx', '@babel/plugin-proposal-nullish-coalescing-operator', + '@babel/plugin-proposal-optional-chaining', [ '@babel/plugin-proposal-class-properties', { diff --git a/package.json b/package.json index 55cc536..ce02315 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "devDependencies": { "@babel/core": "^7.12.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/plugin-syntax-class-properties": "^7.12.13", "@babel/plugin-transform-runtime": "^7.12.1", "@babel/preset-env": "^7.12.1", diff --git a/yarn.lock b/yarn.lock index 70c7596..3a26ea0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -315,6 +315,15 @@ "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" +"@babel/plugin-proposal-optional-chaining@^7.21.0": + version "7.21.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" + integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== + dependencies: + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-proposal-private-property-in-object@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc"