File tree 3 files changed +23
-2
lines changed
packages/react-scripts/config
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) {
145
145
/ \. h t m l $ / ,
146
146
/ \. ( j s | j s x ) $ / ,
147
147
/ \. c s s $ / ,
148
- / \. j s o n $ /
148
+ / \. j s o n $ / ,
149
+ / \. s v g $ /
149
150
] ,
150
151
loader : 'url' ,
151
152
query : {
@@ -196,6 +197,14 @@ module.exports = function(publicPath) {
196
197
{
197
198
test : / \. j s o n $ / ,
198
199
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
+ }
199
208
}
200
209
]
201
210
} ,
Original file line number Diff line number Diff line change @@ -138,7 +138,8 @@ module.exports = {
138
138
/ \. h t m l $ / ,
139
139
/ \. ( j s | j s x ) $ / ,
140
140
/ \. c s s $ / ,
141
- / \. j s o n $ /
141
+ / \. j s o n $ / ,
142
+ / \. s v g $ /
142
143
] ,
143
144
loader : 'url' ,
144
145
query : {
@@ -198,6 +199,14 @@ module.exports = {
198
199
{
199
200
test : / \. j s o n $ / ,
200
201
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
+ }
201
210
}
202
211
]
203
212
} ,
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ npm run build
76
76
test -e build/* .html
77
77
test -e build/static/js/* .js
78
78
test -e build/static/css/* .css
79
+ test -e build/static/media/* .svg
79
80
test -e build/favicon.ico
80
81
81
82
# Run tests with CI flag
@@ -140,6 +141,7 @@ npm run build
140
141
test -e build/* .html
141
142
test -e build/static/js/* .js
142
143
test -e build/static/css/* .css
144
+ test -e build/static/media/* .svg
143
145
test -e build/favicon.ico
144
146
145
147
# Run tests with CI flag
@@ -169,6 +171,7 @@ npm run build
169
171
test -e build/* .html
170
172
test -e build/static/js/* .js
171
173
test -e build/static/css/* .css
174
+ test -e build/static/media/* .svg
172
175
test -e build/favicon.ico
173
176
174
177
# Run tests, overring the watch option to disable it.
You can’t perform that action at this time.
0 commit comments