Skip to content

Commit bd1dee4

Browse files
authored
Upgrade svgr to v2 and disable Prettier/SVGO (facebook#5062)
1 parent 5b62c2e commit bd1dee4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

config/webpack.config.dev.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,8 @@ module.exports = {
251251
{
252252
loaderMap: {
253253
svg: {
254-
ReactComponent: 'svgr/webpack![path]',
254+
ReactComponent:
255+
'@svgr/webpack?-prettier,-svgo![path]',
255256
},
256257
},
257258
},

config/webpack.config.prod.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,8 @@ module.exports = {
289289
{
290290
loaderMap: {
291291
svg: {
292-
ReactComponent: 'svgr/webpack![path]',
292+
ReactComponent:
293+
'@svgr/webpack?-prettier,-svgo![path]',
293294
},
294295
},
295296
},

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"dependencies": {
2424
"@babel/core": "7.1.0",
2525
"@babel/runtime": "7.0.0",
26+
"@svgr/webpack": "2.4.1",
2627
"autoprefixer": "9.1.5",
2728
"babel-core": "7.0.0-bridge.0",
2829
"babel-eslint": "9.0.0",
@@ -63,7 +64,6 @@
6364
"resolve": "1.8.1",
6465
"sass-loader": "7.1.0",
6566
"style-loader": "0.23.0",
66-
"svgr": "1.9.2",
6767
"sw-precache-webpack-plugin": "0.11.5",
6868
"terser-webpack-plugin": "1.1.0",
6969
"thread-loader": "1.2.0",

0 commit comments

Comments
 (0)