This repository was archived by the owner on Oct 16, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
packages/react-scripts/config Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,8 @@ module.exports = function(publicPath) {
145145 / \. h t m l $ / ,
146146 / \. ( j s | j s x ) $ / ,
147147 / \. c s s $ / ,
148- / \. j s o n $ /
148+ / \. j s o n $ / ,
149+ / \. s v g $ /
149150 ] ,
150151 loader : 'url' ,
151152 query : {
@@ -196,6 +197,14 @@ module.exports = function(publicPath) {
196197 {
197198 test : / \. j s o n $ / ,
198199 loader : 'json'
200+ } ,
201+ // "file" loader for svg
202+ {
203+ test : / \. s v g $ / ,
204+ loader : 'file' ,
205+ query : {
206+ name : 'static/media/[name].[hash:8].[ext]'
207+ }
199208 }
200209 ]
201210 } ,
Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ module.exports = {
138138 / \. h t m l $ / ,
139139 / \. ( j s | j s x ) $ / ,
140140 / \. c s s $ / ,
141- / \. j s o n $ /
141+ / \. j s o n $ / ,
142+ / \. s v g $ /
142143 ] ,
143144 loader : 'url' ,
144145 query : {
@@ -198,6 +199,14 @@ module.exports = {
198199 {
199200 test : / \. j s o n $ / ,
200201 loader : 'json'
202+ } ,
203+ // "file" loader for svg
204+ {
205+ test : / \. s v g $ / ,
206+ loader : 'file' ,
207+ query : {
208+ name : 'static/media/[name].[hash:8].[ext]'
209+ }
201210 }
202211 ]
203212 } ,
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ npm run build
7676test -e build/* .html
7777test -e build/static/js/* .js
7878test -e build/static/css/* .css
79+ test -e build/static/media/* .svg
7980test -e build/favicon.ico
8081
8182# Run tests with CI flag
@@ -140,6 +141,7 @@ npm run build
140141test -e build/* .html
141142test -e build/static/js/* .js
142143test -e build/static/css/* .css
144+ test -e build/static/media/* .svg
143145test -e build/favicon.ico
144146
145147# Run tests with CI flag
@@ -169,6 +171,7 @@ npm run build
169171test -e build/* .html
170172test -e build/static/js/* .js
171173test -e build/static/css/* .css
174+ test -e build/static/media/* .svg
172175test -e build/favicon.ico
173176
174177# Run tests, overring the watch option to disable it.
You can’t perform that action at this time.
0 commit comments