Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add font loader #162

Merged
merged 1 commit into from
Mar 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add font loader
  • Loading branch information
gesposito committed Feb 29, 2016
commit fdb2f01ffbbd46897ccfe9a88b36d10646b9c2c3
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