Skip to content

Commit

Permalink
Add rule to handle webfonts
Browse files Browse the repository at this point in the history
  • Loading branch information
rodfersou committed Oct 3, 2018
1 parent f36b419 commit c130b3f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let makeConfig = (name, shortName, path, publicPath='', extraEntries=[], extraPl
}),
}, {
// Handle image optimization
test: /.*\.(gif|png|jpe?g)$/i,
test: /\.(gif|png|jpe?g)$/i,
use: [
{
loader: 'file-loader',
Expand Down Expand Up @@ -91,6 +91,15 @@ let makeConfig = (name, shortName, path, publicPath='', extraEntries=[], extraPl
}
}
]
}, {
test: /\.(eot|svg|ttf|woff2?)$/,
use: {
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
context: 'app/'
}
}
}, {
// Handle SVG files inline in CSS
test: /\.svg/,
Expand Down

0 comments on commit c130b3f

Please sign in to comment.