Skip to content

Commit 12627fc

Browse files
btdDenis Bardadym
andauthored
fix(rollup): missing dep & missing map return (#652)
- Add missing dependency for @babel/preset-typescript - New versions of rollup require that if code/ast returned to have map return also Co-authored-by: Denis Bardadym <denis.bardadym@check24.de>
1 parent e89fbd1 commit 12627fc

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/rollup/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@babel/plugin-transform-react-constant-elements": "^7.14.5",
3737
"@babel/preset-env": "^7.15.6",
3838
"@babel/preset-react": "^7.14.5",
39+
"@babel/preset-typescript": "^7.16.0",
3940
"@svgr/core": "^6.1.1",
4041
"@svgr/plugin-jsx": "^6.1.0",
4142
"@svgr/plugin-svgo": "^6.1.0",

packages/rollup/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const plugin: PluginImpl<Options> = (options = {}) => {
7272
if (!result?.code) {
7373
throw new Error(`Error while transforming using Babel`)
7474
}
75-
return { code: result.code }
75+
return { code: result.code, map: null }
7676
}
7777

7878
return {
@@ -84,6 +84,7 @@ const plugin: PluginImpl<Options> = (options = {}) => {
8484
body: [],
8585
},
8686
code: jsCode,
87+
map: null
8788
}
8889
},
8990
}

0 commit comments

Comments
 (0)