Skip to content

Commit 77045d5

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fix-webpack-ts-compilation
2 parents 535e6bf + 81f2b80 commit 77045d5

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

packages/webpack/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,14 @@ By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configu
102102

103103
### Handle SVG in CSS, Sass or Less
104104

105-
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.
105+
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.
106106

107107
```js
108108
[
109109
{
110110
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
111-
issuer: {
112-
test: /\.jsx?$/,
113-
},
114-
use: ['babel-loader', '@svgr/webpack', 'url-loader'],
111+
issuer: /\.[jt]sx?$/,
112+
use: ['babel-loader', '@svgr/webpack', 'url-loader']
115113
},
116114
{
117115
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
@@ -120,6 +118,8 @@ It is possible to detect the module that requires your SVG using [`Rule.issuer`]
120118
]
121119
```
122120

121+
_[Rule.issuer](https://v4.webpack.js.org/configuration/module/#ruleissuer) in Webpack 4 has additional conditions which are not available in Webpack 5._
122+
123123
## License
124124

125125
MIT

website/src/pages/docs/ecosystem.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is an incomplete list of awesome things built with svgr. If you have someth
1212

1313
- [Create React App](https://facebook.github.io/create-react-app/)
1414
- [React SSR Setup](https://github.com/manuelbieh/react-ssr-setup)
15+
- [SVG Gobbler Browser Extension](https://github.com/rossmoody/svg-gobbler)
1516

1617
## Conferences
1718

website/src/pages/docs/webpack.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,20 +108,20 @@ By default, `@svgr/webpack` includes a `babel-loader` with [an optimized configu
108108

109109
### Handle SVG in CSS, Sass or Less
110110

111-
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.
111+
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.
112112

113113
```js
114-
{
114+
[
115115
{
116116
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
117-
issuer: {
118-
test: /\.jsx?$/
119-
},
117+
issuer: /\.[jt]sx?$/,
120118
use: ['babel-loader', '@svgr/webpack', 'url-loader']
121119
},
122120
{
123121
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
124122
loader: 'url-loader'
125123
},
126-
}
124+
]
127125
```
126+
127+
_[Rule.issuer](https://v4.webpack.js.org/configuration/module/#ruleissuer) in Webpack 4 has additional conditions which are not available in Webpack 5._

0 commit comments

Comments
 (0)