Skip to content

Commit db476dc

Browse files
A-gambitgaearon
authored andcommitted
add otf font format to loaders (#434)
* add off font format to loaders * add otf format support
1 parent d624756 commit db476dc

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

config/eslint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = {
4444
settings: {
4545
'import/ignore': [
4646
'node_modules',
47-
'\\.(json|css|jpg|png|gif|eot|svg|ttf|woff|woff2|mp4|webm)$',
47+
'\\.(json|css|jpg|png|gif|eot|otf|svg|ttf|woff|woff2|mp4|webm)$',
4848
],
4949
'import/extensions': ['.js'],
5050
'import/resolver': {

config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = {
125125
// When you `import` an asset, you get its (virtual) filename.
126126
// In production, they would get copied to the `build` folder.
127127
{
128-
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/,
128+
test: /\.(jpg|png|gif|eot|otf|svg|ttf|woff|woff2)(\?.*)?$/,
129129
include: [paths.appSrc, paths.appNodeModules],
130130
loader: 'file',
131131
query: {

config/webpack.config.prod.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ module.exports = {
129129
{
130130
// "file" loader makes sure those assets end up in the `build` folder.
131131
// When you `import` an asset, you get its filename.
132-
test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/,
132+
test: /\.(jpg|png|gif|eot|otf|svg|ttf|woff|woff2)(\?.*)?$/,
133133
include: [paths.appSrc, paths.appNodeModules],
134134
loader: 'file',
135135
query: {

template/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ esproposal.class_static_fields=enable
370370
esproposal.class_instance_fields=enable
371371

372372
module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css'
373-
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file'
373+
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file'
374374

375375
suppress_type=$FlowIssue
376376
suppress_type=$FlowFixMe
@@ -382,7 +382,7 @@ If you later `eject`, you’ll need to replace `react-scripts` references with t
382382
383383
```ini
384384
module.name_mapper='^\(.*\)\.css$' -> '<PROJECT_ROOT>/config/flow/css'
385-
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '<PROJECT_ROOT>/config/flow/file'
385+
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '<PROJECT_ROOT>/config/flow/file'
386386
```
387387
388388
We will consider integrating more tightly with Flow in the future so that you don’t have to do this.

0 commit comments

Comments
 (0)