Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ To be compatible with existing css files (if not in CSS Module mode):
|**`camelCase`**|`false`|Export Classnames in CamelCase|
|**`importLoaders`**|`0`|Number of loaders applied before CSS loader|

This webpack config can load CSS files, embed small png images as Data URLs and JPG images as files.
The following webpack config can load CSS files, embed small PNG/JPG/GIF/SVG images as well as fonts as [Data URLs](https://tools.ietf.org/html/rfc2397) and copy larger files to the output directory.

**webpack.config.js**
```js
Expand All @@ -100,12 +100,11 @@ module.exports = {
use: [ 'style-loader', 'css-loader' ]
},
{
test: /\.png$/,
use: { loader: 'url-loader', options: { limit: 100000 } },
},
{
test: /\.jpg$/,
use: [ 'file-loader' ]
test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
loader: 'url-loader',
options: {
limit: 10000
}
}
]
}
Expand Down