0
我有bootstrap模板,我試圖把這個到FountainJS。我包含了模板中的所有scss文件,沒關係。現在我需要包括如字體真棒,所以我用npm install font-awesome --save
,並加入到index.js
require('font-awesome');
,但它仍然無法在項目中可用添加字體真棒項目與webpack
我src/index.js
文件:
var angular = require('angular');
var techsModule = require('./app/techs/index');
require('angular-ui-router');
var routesConfig = require('./routes');
var main = require('./app/main');
var header = require('./app/header');
var footer = require('./app/footer');
require('./index.scss');
require('font-awesome');
angular
.module('app', [techsModule, 'ui.router'])
.config(routesConfig)
.component('app', main)
.component('fountainHeader', header)
.component('fountainFooter', footer);
你看看https://gist.github.com/Turbo87/e8e941e68308d3b40ef6或https://github.com/gowravshekar/font- awesome-webpack?下面是使用webpack獲取字體的另一個例子http://www.mattzabriskie.com/blog/font-awesome-webpack –