Skip to content

Commit

Permalink
fix(rollup): missing dep & missing map return (#652)
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
btd and Denis Bardadym authored Dec 12, 2021
1 parent e89fbd1 commit 12627fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion packages/rollup/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const plugin: PluginImpl<Options> = (options = {}) => {
if (!result?.code) {
throw new Error(`Error while transforming using Babel`)
}
return { code: result.code }
return { code: result.code, map: null }
}

return {
Expand All @@ -84,6 +84,7 @@ const plugin: PluginImpl<Options> = (options = {}) => {
body: [],
},
code: jsCode,
map: null
}
},
}
Expand Down

1 comment on commit 12627fc

@vercel
Copy link

@vercel vercel bot commented on 12627fc Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.