From e7caf725c85a9f6fab5c5b1883067cc627996944 Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Thu, 28 Oct 2021 11:28:36 +0800 Subject: [PATCH] fix: when using the `legacy: true` option of @babel/plugin-proposal-decorators, @babel/plugin-proposal-class-properties must be used in `loose: true` mode --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9c86f3b..9e91ab6 100644 --- a/index.js +++ b/index.js @@ -33,8 +33,8 @@ module.exports = function(api) { // Stage 3 '@babel/plugin-syntax-dynamic-import', '@babel/plugin-syntax-import-meta', - ['@babel/plugin-proposal-class-properties', { 'loose': false }], - '@babel/plugin-proposal-json-strings' + ['@babel/plugin-proposal-class-properties', { 'loose': true }], + '@babel/plugin-proposal-json-strings', ] }; };