Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Meta
create-react-app
Commits
15feb02e
Commit
15feb02e
authored
8 years ago
by
Bogdan Soare
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Use file-loader for svgs (#1180)
parent
d8dfdb01
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
packages/react-scripts/config/webpack.config.dev.js
+10
-1
packages/react-scripts/config/webpack.config.dev.js
packages/react-scripts/config/webpack.config.prod.js
+10
-1
packages/react-scripts/config/webpack.config.prod.js
tasks/e2e.sh
+3
-0
tasks/e2e.sh
with
23 additions
and
2 deletions
+23
-2
packages/react-scripts/config/webpack.config.dev.js
+
10
-
1
View file @
15feb02e
...
...
@@ -131,7 +131,8 @@ module.exports = {
/
\.
html$/
,
/
\.(
js|jsx
)
$/
,
/
\.
css$/
,
/
\.
json$/
/
\.
json$/
,
/
\.
svg$/
],
loader
:
'
url
'
,
query
:
{
...
...
@@ -169,6 +170,14 @@ module.exports = {
{
test
:
/
\.
json$/
,
loader
:
'
json
'
},
// "file" loader for svg
{
test
:
/
\.
svg$/
,
loader
:
'
file
'
,
query
:
{
name
:
'
static/media/[name].[hash:8].[ext]
'
}
}
]
},
...
...
This diff is collapsed.
Click to expand it.
packages/react-scripts/config/webpack.config.prod.js
+
10
-
1
View file @
15feb02e
...
...
@@ -138,7 +138,8 @@ module.exports = {
/
\.
html$/
,
/
\.(
js|jsx
)
$/
,
/
\.
css$/
,
/
\.
json$/
/
\.
json$/
,
/
\.
svg$/
],
loader
:
'
url
'
,
query
:
{
...
...
@@ -180,6 +181,14 @@ module.exports = {
{
test
:
/
\.
json$/
,
loader
:
'
json
'
},
// "file" loader for svg
{
test
:
/
\.
svg$/
,
loader
:
'
file
'
,
query
:
{
name
:
'
static/media/[name].[hash:8].[ext]
'
}
}
]
},
...
...
This diff is collapsed.
Click to expand it.
tasks/e2e.sh
+
3
-
0
View file @
15feb02e
...
...
@@ -76,6 +76,7 @@ npm run build
test
-e
build/
*
.html
test
-e
build/static/js/
*
.js
test
-e
build/static/css/
*
.css
test
-e
build/static/media/
*
.svg
test
-e
build/favicon.ico
# Run tests with CI flag
...
...
@@ -140,6 +141,7 @@ npm run build
test
-e
build/
*
.html
test
-e
build/static/js/
*
.js
test
-e
build/static/css/
*
.css
test
-e
build/static/media/
*
.svg
test
-e
build/favicon.ico
# Run tests with CI flag
...
...
@@ -169,6 +171,7 @@ npm run build
test
-e
build/
*
.html
test
-e
build/static/js/
*
.js
test
-e
build/static/css/
*
.css
test
-e
build/static/media/
*
.svg
test
-e
build/favicon.ico
# Run tests, overring the watch option to disable it.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets