0

I'm using react-icons pack (only available for React) from GoranGajic.

If I import like import * as IO from 'react-icons/io I'm getting an error

/Users/boris/WebstormProjects/autralis-sales-new/node_modules/react-icons/io/index.js:1 export IoAlertCircled from './alert-circled'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'

If I import like import * as IO from 'react-icons/lib/io I'm not getting an error, but the icons are not showing. The div where {IO.IoAndroidFavorite} is, is empty.

UPDATE

I'm using ES6 and gulp/babel for transpiling. My .babelrc is as follows :

{
  "presets": ["react", "stage-0", "es2015"],
  "plugins": ["transform-object-rest-spread"]
}

Any advice?

Boky
  • 11,554
  • 28
  • 93
  • 163

0 Answers0