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 @@ -131,7 +131,8 @@ module.exports = {
131131 / \. h t m l $ / ,
132132 / \. ( j s | j s x ) $ / ,
133133 / \. c s s $ / ,
134- / \. j s o n $ /
134+ / \. j s o n $ / ,
135+ / \. s v g $ /
135136 ] ,
136137 loader : 'url' ,
137138 query : {
@@ -169,6 +170,14 @@ module.exports = {
169170 {
170171 test : / \. j s o n $ / ,
171172 loader : 'json'
173+ } ,
174+ // "file" loader for svg
175+ {
176+ test : / \. s v g $ / ,
177+ loader : 'file' ,
178+ query : {
179+ name : 'static/media/[name].[hash:8].[ext]'
180+ }
172181 }
173182 ]
174183 } ,
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 : {
@@ -180,6 +181,14 @@ module.exports = {
180181 {
181182 test : / \. j s o n $ / ,
182183 loader : 'json'
184+ } ,
185+ // "file" loader for svg
186+ {
187+ test : / \. s v g $ / ,
188+ loader : 'file' ,
189+ query : {
190+ name : 'static/media/[name].[hash:8].[ext]'
191+ }
183192 }
184193 ]
185194 } ,
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