Add font-awesome

This commit is contained in:
Drew DeVault 2017-08-06 18:40:16 -04:00
parent 4b3771b7be
commit 6c933f2585
4 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,8 @@
"babel-plugin-transform-react-jsx": "^6.24.1", "babel-plugin-transform-react-jsx": "^6.24.1",
"bootstrap": "^4.0.0-alpha.6", "bootstrap": "^4.0.0-alpha.6",
"express": "^4.15.3", "express": "^4.15.3",
"file-loader": "^0.11.2",
"font-awesome": "^4.7.0",
"node-sass": "^4.5.3", "node-sass": "^4.5.3",
"sass-loader": "^6.0.6" "sass-loader": "^6.0.6"
} }

View File

@ -1 +1,3 @@
@import "bootstrap"; @import "bootstrap";
$fa-font-path: "../node_modules/font-awesome/fonts/";
@import "font-awesome";

View File

@ -3,6 +3,8 @@ import { render } from 'react-dom';
import scss from '../scss/base.scss'; import scss from '../scss/base.scss';
render( render(
<h1>Hello world!</h1>, <h1>
Hello world!
</h1>,
document.getElementById('root') document.getElementById('root')
); );

View File

@ -19,6 +19,7 @@ module.exports = {
module: { module: {
rules: [ rules: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" }, { test: /\.js$/, exclude: /node_modules/, loader: "babel-loader" },
{ test: /\.(ttf|eot|svg|woff2?)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" },
{ test: /\.scss$/, { test: /\.scss$/,
use: [ use: [
'style-loader', 'style-loader',
@ -27,7 +28,8 @@ module.exports = {
loader: 'sass-loader', loader: 'sass-loader',
options: { options: {
includePaths: [ includePaths: [
path.resolve(__dirname, './node_modules/bootstrap/scss/') path.resolve(__dirname, './node_modules/bootstrap/scss/'),
path.resolve(__dirname, './node_modules/font-awesome/scss/')
] ]
} }
} }