From 9a135025976dc601a20202107c8f9419d9b6010a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 30 Dec 2020 14:02:36 +0200 Subject: [PATCH] fix(cloudcmd) client: build: optional chaining --- .babelrc => .babelrc.json | 1 + .webpack/js.js | 5 +---- package.json | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) rename .babelrc => .babelrc.json (68%) diff --git a/.babelrc b/.babelrc.json similarity index 68% rename from .babelrc rename to .babelrc.json index 5fcb804f..bd3a28ff 100644 --- a/.babelrc +++ b/.babelrc.json @@ -4,5 +4,6 @@ ], "plugins": [ "module:babel-plugin-macros", + "@babel/plugin-proposal-optional-chaining" ] } diff --git a/.webpack/js.js b/.webpack/js.js index 48c9d953..ea9d2ff8 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -29,10 +29,7 @@ const clean = (array) => array.filter(notEmpty); const noParse = (a) => /\.spec\.js$/.test(a); const options = { - babelrc: false, - plugins: [ - 'module:babel-plugin-macros', - ], + babelrc: true, }; const rules = clean([ diff --git a/package.json b/package.json index 67e1e300..b368bb4d 100644 --- a/package.json +++ b/package.json @@ -161,6 +161,7 @@ "devDependencies": { "@babel/code-frame": "^7.5.5", "@babel/core": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", "@babel/preset-env": "^7.0.0", "@cloudcmd/clipboard": "^2.0.0", "@cloudcmd/create-element": "^2.0.0",