Skip to content

lu-com/url-relative-loader

This branch is 2 commits ahead of, 105 commits behind webpack-contrib/url-loader:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
HongminQiao[UFO]
May 30, 2016
3061ef0 · May 30, 2016

History

30 Commits
Jul 19, 2012
May 30, 2016
May 29, 2016
May 30, 2016

Repository files navigation

url relative loader for webpack

This project is base on url-loader.

Usage

Documentation: Using loaders

The url loader works like the file loader, but can return a Data Url if the file is smaller than a limit.

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

If the file is greater than the limit the file-loader is used and all query parameters are passed to it.

require("url?limit=10000!./file.png");
// => DataUrl if "file.png" is smaller that 10kb

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

require("url?prefix=img/!./file.png");
// => Parameters for the file-loader are valid too
//    They are passed to the file-loader if used.

License

MIT (http://www.opensource.org/licenses/mit-license.php)

About

url relative loader module for webpack

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%