Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
docs(README): fix typesetting, add links (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 authored and michael-ciniawsky committed Apr 28, 2017
1 parent de61cbd commit 9356a81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ npm install --save-dev url-loader

<h2 align="center"><a href="https://webpack.js.org/concepts/loaders">Usage</a></h2>

The `url` loader works like the `file` loader, but can return a Data Url if the file is smaller than a byte limit.
The `url-loader` works like the [`file-loader`](https://github.com/webpack-contrib/file-loader), but can return a [data URL](https://tools.ietf.org/html/rfc2397) if the file is smaller than a byte limit.

The limit can be specified with a query parameter. (Defaults to no limit)
The limit can be specified with a query parameter (defaults to no limit).

If the file is greater than the limit (in bytes) the [`file-loader`](https://github.com/webpack/file-loader) is used and all query parameters are passed to it.
If the file is greater than the limit (in bytes) the `file-loader` is used and all query parameters are passed to it.

``` javascript
require("url-loader?limit=10000!./file.png");
// => DataUrl if "file.png" is smaller than 10kb
// => data URL if "file.png" is smaller than 10kb

require("url-loader?mimetype=image/png!./file.png");
// => Specify mimetype for the file (Otherwise it's inferred from extension.)
Expand Down

0 comments on commit 9356a81

Please sign in to comment.