From 8fe5916899595e296d1bd00e84931c44dc9f6dae Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Wed, 8 Dec 2021 10:05:46 +0100 Subject: [PATCH 1/2] Add missing dependency for @babel/preset-typescript --- packages/rollup/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rollup/package.json b/packages/rollup/package.json index 71934d15..2c9ea66c 100644 --- a/packages/rollup/package.json +++ b/packages/rollup/package.json @@ -36,6 +36,7 @@ "@babel/plugin-transform-react-constant-elements": "^7.14.5", "@babel/preset-env": "^7.15.6", "@babel/preset-react": "^7.14.5", + "@babel/preset-typescript": "^7.16.0", "@svgr/core": "^6.1.1", "@svgr/plugin-jsx": "^6.1.0", "@svgr/plugin-svgo": "^6.1.0", From c9282b1478dab27c11657df82aa75eaf7202eb46 Mon Sep 17 00:00:00 2001 From: Denis Bardadym Date: Wed, 8 Dec 2021 10:06:51 +0100 Subject: [PATCH 2/2] New versions of rollup require that if code/ast returned to have map return also --- packages/rollup/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rollup/src/index.ts b/packages/rollup/src/index.ts index 753f5ee3..fe90c78e 100644 --- a/packages/rollup/src/index.ts +++ b/packages/rollup/src/index.ts @@ -72,7 +72,7 @@ const plugin: PluginImpl = (options = {}) => { if (!result?.code) { throw new Error(`Error while transforming using Babel`) } - return { code: result.code } + return { code: result.code, map: null } } return { @@ -84,6 +84,7 @@ const plugin: PluginImpl = (options = {}) => { body: [], }, code: jsCode, + map: null } }, }