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 @@ -131,7 +131,8 @@ module.exports = {
131
131
/ \. h t m l $ / ,
132
132
/ \. ( j s | j s x ) $ / ,
133
133
/ \. c s s $ / ,
134
- / \. j s o n $ /
134
+ / \. j s o n $ / ,
135
+ / \. s v g $ /
135
136
] ,
136
137
loader : 'url' ,
137
138
query : {
@@ -169,6 +170,14 @@ module.exports = {
169
170
{
170
171
test : / \. j s o n $ / ,
171
172
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
+ }
172
181
}
173
182
]
174
183
} ,
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 : {
@@ -180,6 +181,14 @@ module.exports = {
180
181
{
181
182
test : / \. j s o n $ / ,
182
183
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
+ }
183
192
}
184
193
]
185
194
} ,
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