File tree Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Expand file tree Collapse file tree 4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 27
27
"react-dom" : " ^15.0.0 || ^16.0.0"
28
28
},
29
29
"devDependencies" : {
30
+ "@svgr/rollup" : " ^2.4.1" ,
30
31
"babel-core" : " ^6.26.3" ,
31
32
"babel-eslint" : " ^8.2.5" ,
32
33
"babel-plugin-external-helpers" : " ^6.22.0" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import external from 'rollup-plugin-peer-deps-external'
4
4
import postcss from 'rollup-plugin-postcss'
5
5
import resolve from 'rollup-plugin-node-resolve'
6
6
import url from 'rollup-plugin-url'
7
+ import svgr from '@svgr/rollup'
7
8
8
9
import pkg from './package.json'
9
10
@@ -27,6 +28,7 @@ export default {
27
28
modules : true
28
29
} ) ,
29
30
url ( ) ,
31
+ svgr ( ) ,
30
32
babel ( {
31
33
exclude : 'node_modules/**' ,
32
34
plugins : [ 'external-helpers' ]
Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react'
2
2
import PropTypes from 'prop-types'
3
3
4
+ import { ReactComponent as ReactIcon } from './react-icon.svg'
5
+
4
6
import styles from './styles.css'
5
7
6
8
export default class ExampleComponent extends Component {
@@ -16,6 +18,7 @@ export default class ExampleComponent extends Component {
16
18
return (
17
19
< div className = { styles . test } >
18
20
Example Component: { text }
21
+ < ReactIcon />
19
22
</ div >
20
23
)
21
24
}
You can’t perform that action at this time.
0 commit comments