From dc50dd320e506e1655fa3635bc5f74479811d2e0 Mon Sep 17 00:00:00 2001 From: Sudhir Mitharwal Date: Mon, 15 Jul 2019 20:24:19 +0530 Subject: [PATCH] Allow title to be set when importing SVGs (#7118) --- .github/ISSUE_TEMPLATE/bug_report.md | 15 ++++----------- .github/ISSUE_TEMPLATE/proposal.md | 4 ++-- packages/react-scripts/config/webpack.config.js | 3 ++- packages/react-scripts/package.json | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ef59c777..ac73b33e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Create a report to help us improve -labels: "issue: bug" +labels: 'issue: bug' --- diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 7543dbbe..dae24051 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -388,7 +388,8 @@ module.exports = function(webpackEnv) { { loaderMap: { svg: { - ReactComponent: '@svgr/webpack?-svgo,+ref![path]', + ReactComponent: + '@svgr/webpack?-svgo,+titleProp,+ref![path]', }, }, }, diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index af92d8ab..7d4a3a0c 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -29,7 +29,7 @@ "types": "./lib/react-app.d.ts", "dependencies": { "@babel/core": "7.4.3", - "@svgr/webpack": "4.2.0", + "@svgr/webpack": "4.3.1", "@typescript-eslint/eslint-plugin": "1.10.2", "@typescript-eslint/parser": "1.10.2", "babel-eslint": "10.0.1",