Skip to content

Commit

Permalink
Upgrade @svgr/webpack to 4.1.0 (#5816)
Browse files Browse the repository at this point in the history
* Upgrade svgr to 4.0.3

* Upgrade svgr to 4.0.4

* Remove unnecessary prettier option

* Update to 4.1.0
  • Loading branch information
alaycock authored and iansu committed Jan 12, 2019
1 parent 132ac35 commit 8174eed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
13 changes: 6 additions & 7 deletions packages/babel-plugin-named-asset-import/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginTester({
pluginOptions: {
loaderMap: {
svg: {
ReactComponent: '@svgr/webpack?-prettier,-svgo![path]',
ReactComponent: '@svgr/webpack?-svgo![path]',
},
},
},
Expand Down Expand Up @@ -36,15 +36,15 @@ 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:
'import logo, { logoUrl , ReactComponent as Logo } from "logo.svg";',
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;',
Expand Down Expand Up @@ -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";',
},
},
});
3 changes: 1 addition & 2 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@ module.exports = function(webpackEnv) {
{
loaderMap: {
svg: {
ReactComponent:
'@svgr/webpack?-prettier,-svgo![path]',
ReactComponent: '@svgr/webpack?-svgo![path]',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8174eed

Please sign in to comment.