Skip to content

Commit

Permalink
fix(rollup): support rollup-plugin-typescript2 #127
Browse files Browse the repository at this point in the history
  • Loading branch information
vwxyutarooo committed Jul 27, 2018
1 parent d336fe2 commit e6eee09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@babel/preset-env",
{
"targets": {
"node": "8"
"node": "6"
},
"loose": true
}
Expand Down
8 changes: 6 additions & 2 deletions packages/rollup/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ function svgrPlugin(options = {}) {
)
})

const code = babel ? await pBabelTransform(jsCode) : jsCode
if (babel) {
const code = await pBabelTransform(jsCode);

return { ast, code, map: { mappings: '' } }
return { code, map: { mappings: '' } }
}

return { ast, code: jsCode, map: { mappings: '' } }
},
}
}
Expand Down

0 comments on commit e6eee09

Please sign in to comment.