From f61913c2d351d8e316017e739ee47f5d739683ba Mon Sep 17 00:00:00 2001 From: Daniel Ruf <827205+DanielRuf@users.noreply.github.com> Date: Sun, 29 Sep 2019 16:36:38 +0200 Subject: [PATCH] fix: correctly load font files - closes #128 (#134) * fix: correctly load font files - closes #128 * Resolve issue with the moduleNameWrapper in Jest --- src/App/App.tsx | 2 +- src/styles/typeface-roboto.css | 1 - tools/webpack.config.js | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 src/styles/typeface-roboto.css diff --git a/src/App/App.tsx b/src/App/App.tsx index a8bd057..f9cca35 100644 --- a/src/App/App.tsx +++ b/src/App/App.tsx @@ -10,7 +10,7 @@ import Header from '../components/Header'; import { Container, Content } from '../components/Layout'; import RouterApp from '../router'; import API from '../utils/api'; -import '../styles/typeface-roboto.css'; +import 'typeface-roboto/index.css'; import '../utils/styles/global'; import 'normalize.css'; import Footer from '../components/Footer'; diff --git a/src/styles/typeface-roboto.css b/src/styles/typeface-roboto.css deleted file mode 100644 index f79f754..0000000 --- a/src/styles/typeface-roboto.css +++ /dev/null @@ -1 +0,0 @@ -@import '~typeface-roboto'; diff --git a/tools/webpack.config.js b/tools/webpack.config.js index fa87aab..515d8a8 100644 --- a/tools/webpack.config.js +++ b/tools/webpack.config.js @@ -66,7 +66,7 @@ module.exports = { test: /\.(woff|woff2|eot|ttf|otf)$/, loader: 'url-loader', options: { - name: 'fonts/[name].[ext]', + name: '/fonts/[name].[ext]', limit: 50, }, },