Skip to content

Commit

Permalink
Merge pull request #162 from gesposito/master
Browse files Browse the repository at this point in the history
Add font loader
  • Loading branch information
KyleAMathews committed Mar 1, 2016
2 parents 6ea62b9 + fdb2f01 commit fb260b6
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions lib/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>
test: /\.jpg$/,
loader: 'null',
})
config.loader('svg', {
test: /\.svg$/,
loader: 'null',
})
config.loader('gif', {
test: /\.gif$/,
loader: 'null',
Expand All @@ -224,6 +220,23 @@ module.exports = (program, directory, stage, webpackPort = 1500, routes = []) =>
directory,
},
})
// Font loaders
config.loader('woff', {
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url-loader?limit=10000&minetype=application/font-woff',
})
config.loader('ttf', {
test: /\.(ttf)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
})
config.loader('eot', {
test: /\.(eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
})
config.loader('svg', {
test: /\.(svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'file-loader',
})

switch (stage) {
case 'develop':
Expand Down

0 comments on commit fb260b6

Please sign in to comment.