From 7727be6a99cefb5126189109ff6334b548b001e7 Mon Sep 17 00:00:00 2001 From: Ross Moody Date: Mon, 16 Aug 2021 14:40:31 -0700 Subject: [PATCH 1/2] docs: update ecosystem.mdx (#581) --- website/src/pages/docs/ecosystem.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/website/src/pages/docs/ecosystem.mdx b/website/src/pages/docs/ecosystem.mdx index 380f0633..e76ec953 100644 --- a/website/src/pages/docs/ecosystem.mdx +++ b/website/src/pages/docs/ecosystem.mdx @@ -12,6 +12,7 @@ This is an incomplete list of awesome things built with svgr. If you have someth - [Create React App](https://facebook.github.io/create-react-app/) - [React SSR Setup](https://github.com/manuelbieh/react-ssr-setup) +- [SVG Gobbler Browser Extension](https://github.com/rossmoody/svg-gobbler) ## Conferences From 81f2b8021fb3348f67a48a1da257e447735348c5 Mon Sep 17 00:00:00 2001 From: Sahin D <5789670+seahindeniz@users.noreply.github.com> Date: Tue, 17 Aug 2021 00:40:53 +0300 Subject: [PATCH 2/2] docs: few adjustments for Webpack 5 (#562) --- packages/webpack/README.md | 8 ++++---- website/src/pages/docs/webpack.mdx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/webpack/README.md b/packages/webpack/README.md index aa02e4ae..944bfa9a 100644 --- a/packages/webpack/README.md +++ b/packages/webpack/README.md @@ -102,15 +102,13 @@ By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configu ### Handle SVG in CSS, Sass or Less -It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#rule-issuer) in Webpack. Using it you can specify two different configurations for JavaScript and the rest of your files. +It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#ruleissuer) in Webpack 5. Using it you can specify two different configurations for JavaScript and the rest of your files. ```js [ { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - issuer: { - test: /\.jsx?$/ - }, + issuer: /\.[jt]sx?$/, use: ['babel-loader', '@svgr/webpack', 'url-loader'] }, { @@ -120,6 +118,8 @@ It is possible to detect the module that requires your SVG using [`Rule.issuer`] ] ``` +_[Rule.issuer](https://v4.webpack.js.org/configuration/module/#ruleissuer) in Webpack 4 has additional conditions which are not available in Webpack 5._ + ## License MIT diff --git a/website/src/pages/docs/webpack.mdx b/website/src/pages/docs/webpack.mdx index beeb8056..1929bcc8 100644 --- a/website/src/pages/docs/webpack.mdx +++ b/website/src/pages/docs/webpack.mdx @@ -108,20 +108,20 @@ By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configu ### Handle SVG in CSS, Sass or Less -It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#rule-issuer) in Webpack. Using it you can specify two different configurations for JavaScript and the rest of your files. +It is possible to detect the module that requires your SVG using [`Rule.issuer`](https://webpack.js.org/configuration/module/#ruleissuer) in Webpack 5. Using it you can specify two different configurations for JavaScript and the rest of your files. ```js -{ +[ { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - issuer: { - test: /\.jsx?$/ - }, + issuer: /\.[jt]sx?$/, use: ['babel-loader', '@svgr/webpack', 'url-loader'] }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader' }, -} +] ``` + +_[Rule.issuer](https://v4.webpack.js.org/configuration/module/#ruleissuer) in Webpack 4 has additional conditions which are not available in Webpack 5._