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
dcdcab0e
Commit
dcdcab0e
authored
8 years ago
by
Felipe Moyano
Committed by
Dan Abramov
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Added support for webp images in
#442
(#458)
parent
2b5eb82c
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
config/eslint.js
+1
-1
config/eslint.js
config/webpack.config.dev.js
+1
-1
config/webpack.config.dev.js
config/webpack.config.prod.js
+1
-1
config/webpack.config.prod.js
scripts/utils/createJestConfig.js
+1
-1
scripts/utils/createJestConfig.js
template/README.md
+2
-2
template/README.md
with
6 additions
and
6 deletions
+6
-6
config/eslint.js
+
1
-
1
View file @
dcdcab0e
...
@@ -45,7 +45,7 @@ module.exports = {
...
@@ -45,7 +45,7 @@ module.exports = {
settings
:
{
settings
:
{
'
import/ignore
'
:
[
'
import/ignore
'
:
[
'
node_modules
'
,
'
node_modules
'
,
'
\\
.(json|css|jpg|png|gif|eot|otf|svg|ttf|woff|woff2|mp4|webm)$
'
,
'
\\
.(json|css|jpg|png|gif|eot|otf|
webp|
svg|ttf|woff|woff2|mp4|webm)$
'
,
],
],
'
import/extensions
'
:
[
'
.js
'
],
'
import/extensions
'
:
[
'
.js
'
],
'
import/resolver
'
:
{
'
import/resolver
'
:
{
...
...
This diff is collapsed.
Click to expand it.
config/webpack.config.dev.js
+
1
-
1
View file @
dcdcab0e
...
@@ -126,7 +126,7 @@ module.exports = {
...
@@ -126,7 +126,7 @@ module.exports = {
// When you `import` an asset, you get its (virtual) filename.
// When you `import` an asset, you get its (virtual) filename.
// In production, they would get copied to the `build` folder.
// In production, they would get copied to the `build` folder.
{
{
test
:
/
\.(
ico|jpg|png|gif|eot|otf|svg|ttf|woff|woff2
)(\?
.*
)?
$/
,
test
:
/
\.(
ico|jpg|png|gif|eot|otf|
webp|
svg|ttf|woff|woff2
)(\?
.*
)?
$/
,
include
:
[
paths
.
appSrc
,
paths
.
appNodeModules
],
include
:
[
paths
.
appSrc
,
paths
.
appNodeModules
],
exclude
:
/
\/
favicon.ico$/
,
exclude
:
/
\/
favicon.ico$/
,
loader
:
'
file
'
,
loader
:
'
file
'
,
...
...
This diff is collapsed.
Click to expand it.
config/webpack.config.prod.js
+
1
-
1
View file @
dcdcab0e
...
@@ -136,7 +136,7 @@ module.exports = {
...
@@ -136,7 +136,7 @@ module.exports = {
// "file" loader makes sure those assets end up in the `build` folder.
// "file" loader makes sure those assets end up in the `build` folder.
// When you `import` an asset, you get its filename.
// When you `import` an asset, you get its filename.
{
{
test
:
/
\.(
ico|jpg|png|gif|eot|otf|svg|ttf|woff|woff2
)(\?
.*
)?
$/
,
test
:
/
\.(
ico|jpg|png|gif|eot|otf|
webp|
svg|ttf|woff|woff2
)(\?
.*
)?
$/
,
exclude
:
/
\/
favicon.ico$/
,
exclude
:
/
\/
favicon.ico$/
,
include
:
[
paths
.
appSrc
,
paths
.
appNodeModules
],
include
:
[
paths
.
appSrc
,
paths
.
appNodeModules
],
loader
:
'
file
'
,
loader
:
'
file
'
,
...
...
This diff is collapsed.
Click to expand it.
scripts/utils/createJestConfig.js
+
1
-
1
View file @
dcdcab0e
...
@@ -11,7 +11,7 @@ module.exports = (resolve, rootDir) => {
...
@@ -11,7 +11,7 @@ module.exports = (resolve, rootDir) => {
const
config
=
{
const
config
=
{
automock
:
false
,
automock
:
false
,
moduleNameMapper
:
{
moduleNameMapper
:
{
'
^[./a-zA-Z0-9$_-]+
\\
.(jpg|png|gif|eot|otf|svg|ttf|woff|woff2|mp4|webm)$
'
:
resolve
(
'
config/jest/FileStub.js
'
),
'
^[./a-zA-Z0-9$_-]+
\\
.(jpg|png|gif|eot|otf|
webp|
svg|ttf|woff|woff2|mp4|webm)$
'
:
resolve
(
'
config/jest/FileStub.js
'
),
'
^[./a-zA-Z0-9$_-]+
\\
.css$
'
:
resolve
(
'
config/jest/CSSStub.js
'
)
'
^[./a-zA-Z0-9$_-]+
\\
.css$
'
:
resolve
(
'
config/jest/CSSStub.js
'
)
},
},
persistModuleRegistryBetweenSpecs
:
true
,
persistModuleRegistryBetweenSpecs
:
true
,
...
...
This diff is collapsed.
Click to expand it.
template/README.md
+
2
-
2
View file @
dcdcab0e
...
@@ -373,7 +373,7 @@ esproposal.class_static_fields=enable
...
@@ -373,7 +373,7 @@ esproposal.class_static_fields=enable
esproposal.class_instance_fields
=
enable
esproposal.class_instance_fields
=
enable
module.name_mapper
=
'^\(.*\)\.css$'
-> 'react-scripts/config/flow/css'
module.name_mapper
=
'^\(.*\)\.css$'
-> 'react-scripts/config/flow/css'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> 'react-scripts/config/flow/file'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|
webp\|
svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> 'react-scripts/config/flow/file'
suppress_type
=
$FlowIssue
suppress_type
=
$FlowIssue
suppress_type
=
$FlowFixMe
suppress_type
=
$FlowFixMe
...
@@ -385,7 +385,7 @@ If you later `eject`, you’ll need to replace `react-scripts` references with t
...
@@ -385,7 +385,7 @@ If you later `eject`, you’ll need to replace `react-scripts` references with t
```
ini
```
ini
module.name_mapper
=
'^\(.*\)\.css$'
-> '<PROJECT_ROOT>/config/flow/css'
module.name_mapper
=
'^\(.*\)\.css$'
-> '<PROJECT_ROOT>/config/flow/css'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> '<PROJECT_ROOT>/config/flow/file'
module.name_mapper
=
'^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|
webp\|
svg\|ttf\|woff\|woff2\|mp4\|webm\)$'
-> '<PROJECT_ROOT>/config/flow/file'
```
```
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.
...
...
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