From ff83b4990f5f9ea7cc4e831ba8ae33fb841a768d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Fri, 24 Feb 2017 13:29:50 +0000 Subject: [PATCH] fix Base.global fonts --- frontend/webpack/base.js | 10 +++------- ui/.babelrc | 1 - ui/Makefile | 2 +- ui/src/components/base/global.js | 1 + 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/frontend/webpack/base.js b/frontend/webpack/base.js index 518a7924..bcc17e57 100644 --- a/frontend/webpack/base.js +++ b/frontend/webpack/base.js @@ -63,9 +63,7 @@ module.exports = { } }, { test: /js?$/, - loaders: [ - 'babel-loader' - ], + loader: 'babel-loader', exclude: /node_modules/, include: [ FRONTEND, @@ -73,12 +71,10 @@ module.exports = { ], }, { test: /\.svg/, - loader: [ - 'file-loader' - ], + loader: 'file-loader', exclude: [ /node_modules/, - path.join(UI, 'shared', 'fonts') + path.join(UI, 'assets', 'fonts') ], include: [ FRONTEND, diff --git a/ui/.babelrc b/ui/.babelrc index e661961e..f71dc49f 100644 --- a/ui/.babelrc +++ b/ui/.babelrc @@ -12,7 +12,6 @@ }] ], "plugins": [ - "inline-react-svg", "transform-class-properties", ["transform-object-rest-spread", { "useBuiltIns": true diff --git a/ui/Makefile b/ui/Makefile index 7391ac8c..3483b528 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -42,7 +42,7 @@ install-production: compile compile: install mkdir -p dist cp -R src/. dist/. - $(bindir)/babel src --out-dir dist --source-maps inline + $(bindir)/babel src --out-dir dist --source-maps inline --plugins=inline-react-svg .PHONY: build build: diff --git a/ui/src/components/base/global.js b/ui/src/components/base/global.js index 91a6d5cc..3a2afcea 100644 --- a/ui/src/components/base/global.js +++ b/ui/src/components/base/global.js @@ -70,6 +70,7 @@ const fontFaces = fonts.map(({ url('${filenames.svg}#${family}') format('svg'); font-weight: ${weight}; font-style: ${style}; + } `); export default css`