diff --git a/config/eslint.js b/config/eslint.js index 5d6831b8257..c6e64befb7e 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -44,7 +44,7 @@ module.exports = { settings: { 'import/ignore': [ 'node_modules', - '\\.(json|css|jpg|png|gif|eot|svg|ttf|woff|woff2|mp4|webm)$', + '\\.(json|css|jpg|png|gif|eot|otf|svg|ttf|woff|woff2|mp4|webm)$', ], 'import/extensions': ['.js'], 'import/resolver': { diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 1fa281b5097..94cc5cff954 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -125,7 +125,7 @@ module.exports = { // When you `import` an asset, you get its (virtual) filename. // In production, they would get copied to the `build` folder. { - test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/, + test: /\.(jpg|png|gif|eot|otf|svg|ttf|woff|woff2)(\?.*)?$/, include: [paths.appSrc, paths.appNodeModules], loader: 'file', query: { diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 575dc93a62d..2a27d3044ce 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -129,7 +129,7 @@ module.exports = { { // "file" loader makes sure those assets end up in the `build` folder. // When you `import` an asset, you get its filename. - test: /\.(jpg|png|gif|eot|svg|ttf|woff|woff2)(\?.*)?$/, + test: /\.(jpg|png|gif|eot|otf|svg|ttf|woff|woff2)(\?.*)?$/, include: [paths.appSrc, paths.appNodeModules], loader: 'file', query: { diff --git a/template/README.md b/template/README.md index c1bffade6ff..0dcbd702f44 100644 --- a/template/README.md +++ b/template/README.md @@ -370,7 +370,7 @@ esproposal.class_static_fields=enable esproposal.class_instance_fields=enable module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css' -module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file' +module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file' suppress_type=$FlowIssue suppress_type=$FlowFixMe @@ -382,7 +382,7 @@ If you later `eject`, you’ll need to replace `react-scripts` references with t ```ini module.name_mapper='^\(.*\)\.css$' -> '/config/flow/css' -module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '/config/flow/file' +module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|otf\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> '/config/flow/file' ``` We will consider integrating more tightly with Flow in the future so that you don’t have to do this.