diff --git a/packages/babel-plugin-transform-svg-component/src/util.js b/packages/babel-plugin-transform-svg-component/src/util.js index 2c6d35d5..0ca060b5 100644 --- a/packages/babel-plugin-transform-svg-component/src/util.js +++ b/packages/babel-plugin-transform-svg-component/src/util.js @@ -72,7 +72,9 @@ export const getExport = ({ template }, opts) => { if (opts.state.caller && opts.state.caller.previousExport) { result += `${opts.state.caller.previousExport}\n` result += `export { ${exportName} as ReactComponent }` - return template.ast(result) + return template.ast(result, { + plugins: ['jsx'], + }) } result += `export default ${exportName}`