1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00

fix Base.global import

This commit is contained in:
Sérgio Ramos 2017-02-24 12:10:28 +00:00
parent 7ce458fe2d
commit 5307fc0c9d
3 changed files with 15 additions and 22 deletions

View File

@ -4,7 +4,7 @@ import { Switch, Route } from 'react-router-dom';
import { injectGlobal } from 'styled-components'; import { injectGlobal } from 'styled-components';
import { updateRouter } from '@state/actions'; import { updateRouter } from '@state/actions';
import Article from '@components/article'; import Article from '@components/article';
import Base from '@ui/components/base'; import Base, { global } from '@ui/components/base';
import BaselineGrid from '@ui/components/baseline-grid'; import BaselineGrid from '@ui/components/baseline-grid';
import Footer from '@components/footer'; import Footer from '@components/footer';
import Header from '@containers/header'; import Header from '@containers/header';
@ -32,7 +32,7 @@ const App = connect()(React.createClass({
dispatch(updateRouter(router)); dispatch(updateRouter(router));
injectGlobal` injectGlobal`
${Base.global} ${global}
`; `;
}, },
render: function() { render: function() {

View File

@ -45,6 +45,7 @@ module.exports = {
], ],
module: { module: {
rules: [{ rules: [{
loader: 'url-loader',
exclude: [ exclude: [
/\.html$/, /\.html$/,
/\.(js|jsx)$/, /\.(js|jsx)$/,
@ -53,7 +54,6 @@ module.exports = {
/\.svg$/, /\.svg$/,
/\.(eot|svg|ttf|woff|woff2)$/ /\.(eot|svg|ttf|woff|woff2)$/
], ],
loader: 'url-loader',
include: [ include: [
FRONTEND, FRONTEND,
UI UI
@ -63,16 +63,19 @@ module.exports = {
} }
}, { }, {
test: /js?$/, test: /js?$/,
loaders: [
'babel-loader'
],
exclude: /node_modules/, exclude: /node_modules/,
include: [ include: [
FRONTEND, FRONTEND,
UI UI
], ],
loaders: [
'babel-loader'
]
}, { }, {
test: /\.svg/, test: /\.svg/,
loader: [
'file-loader'
],
exclude: [ exclude: [
/node_modules/, /node_modules/,
path.join(UI, 'shared', 'fonts') path.join(UI, 'shared', 'fonts')
@ -80,31 +83,16 @@ module.exports = {
include: [ include: [
FRONTEND, FRONTEND,
UI UI
],
loader: [
'file-loader'
] ]
}, { }, {
test: /\.(eot|svg|ttf|woff|woff2)$/, test: /\.(eot|svg|ttf|woff|woff2)$/,
loader: 'file-loader', loader: 'file-loader',
// XXX: By commenting this out, production "BUILD=production make compile"
// will break.
//
// exclude: /node_modules/,
include: [ include: [
path.join(UI, 'shared', 'fonts') path.join(UI, 'assets', 'fonts')
] ]
}, { }, {
test: /\.css$/, test: /\.css$/,
loader: 'style-loader!css-loader' loader: 'style-loader!css-loader'
// XXX: Commenting out breaks node_modules that use css
// i.e react-select.
// exclude: /node_modules/,
// include: [
// FRONTEND,
// UI
// ]
}] }]
} }
}; };

View File

@ -1,5 +1,6 @@
import { colors } from '../../shared/constants'; import { colors } from '../../shared/constants';
import styled from 'styled-components'; import styled from 'styled-components';
import global from './global';
import { import {
libreFranklin, libreFranklin,
@ -16,3 +17,7 @@ export default styled.div`
${bodyColor} ${bodyColor}
${regular} ${regular}
`; `;
export {
global
};