diff --git a/packages/babel-plugin-named-asset-import/index.test.js b/packages/babel-plugin-named-asset-import/index.test.js index f14139f0fd6..17b1927be16 100644 --- a/packages/babel-plugin-named-asset-import/index.test.js +++ b/packages/babel-plugin-named-asset-import/index.test.js @@ -6,7 +6,7 @@ pluginTester({ pluginOptions: { loaderMap: { svg: { - ReactComponent: '@svgr/webpack?-prettier,-svgo![path]', + ReactComponent: '@svgr/webpack?-svgo![path]', }, }, }, @@ -36,7 +36,7 @@ pluginTester({ svgReactComponentNamedImport: { code: 'import { ReactComponent as logo } from "logo.svg";', output: - 'import { ReactComponent as logo } from "@svgr/webpack?-prettier,-svgo!logo.svg";', + 'import { ReactComponent as logo } from "@svgr/webpack?-svgo!logo.svg";', }, svgMultipleImport: { code: @@ -44,7 +44,7 @@ pluginTester({ output: 'import logo from "logo.svg";\n' + 'import { logoUrl } from "logo.svg";\n' + - 'import { ReactComponent as Logo } from "@svgr/webpack?-prettier,-svgo!logo.svg";', + 'import { ReactComponent as Logo } from "@svgr/webpack?-svgo!logo.svg";', }, defaultExport: { code: 'export default logo;', @@ -81,18 +81,17 @@ pluginTester({ svgReactComponentNamedExport: { code: 'export { ReactComponent as Logo } from "logo.svg";', output: - 'export { ReactComponent as Logo } from "@svgr/webpack?-prettier,-svgo!logo.svg";', + 'export { ReactComponent as Logo } from "@svgr/webpack?-svgo!logo.svg";', }, svgReactComponentExport: { code: 'export { ReactComponent } from "logo.svg";', - output: - 'export { ReactComponent } from "@svgr/webpack?-prettier,-svgo!logo.svg";', + output: 'export { ReactComponent } from "@svgr/webpack?-svgo!logo.svg";', }, svgMultipleExport: { code: 'export { logoUrl , ReactComponent as Logo } from "logo.svg";', output: 'export { logoUrl } from "logo.svg";\n' + - 'export { ReactComponent as Logo } from "@svgr/webpack?-prettier,-svgo!logo.svg";', + 'export { ReactComponent as Logo } from "@svgr/webpack?-svgo!logo.svg";', }, }, }); diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index ed85b555ea6..a5f147ce0ef 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -377,8 +377,7 @@ module.exports = function(webpackEnv) { { loaderMap: { svg: { - ReactComponent: - '@svgr/webpack?-prettier,-svgo![path]', + ReactComponent: '@svgr/webpack?-svgo![path]', }, }, }, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index 0a94c39bd2d..e98bd4dd798 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -25,7 +25,7 @@ "types": "./lib/react-app.d.ts", "dependencies": { "@babel/core": "7.2.2", - "@svgr/webpack": "2.4.1", + "@svgr/webpack": "4.1.0", "babel-core": "7.0.0-bridge.0", "babel-eslint": "9.0.0", "babel-jest": "23.6.0",