File: //opt/code/node_modules/url-loader/package.json
{
"name": "url-loader",
"version": "0.5.9",
"author": {
"name": "Tobias Koppers @sokra"
},
"description": "url loader module for webpack",
"license": "MIT",
"scripts": {
"release": "standard-version"
},
"dependencies": {
"loader-utils": "^1.0.2",
"mime": "1.3.x"
},
"devDependencies": {
"standard-version": "^4.0.0"
},
"peerDependencies": {
"file-loader": "*"
},
"repository": {
"type": "git",
"url": "git@github.com:webpack/url-loader.git"
},
"readme": "[![npm][npm]][npm-url]\r\n[![node][node]][node-url]\r\n[![deps][deps]][deps-url]\r\n[![tests][tests]][tests-url]\r\n[![coverage][cover]][cover-url]\r\n[![chat][chat]][chat-url]\r\n\r\n<div align=\"center\">\r\n <a href=\"https://github.com/webpack/webpack\">\r\n <img width=\"200\" height=\"200\"\r\n src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon.svg\">\r\n </a>\r\n <h1>URL Loader</h1>\r\n <p>Loads files as `base64` encoded URL</p>\r\n</div>\r\n\r\n<h2 align=\"center\">Install</h2>\r\n\r\n```bash\r\nnpm install --save-dev url-loader\r\n```\r\n\r\n<h2 align=\"center\"><a href=\"https://webpack.js.org/concepts/loaders\">Usage</a></h2>\r\n\r\nThe `url-loader` works like the [`file-loader`](https://github.com/webpack-contrib/file-loader), but can return a DataURL if the file is smaller than a byte limit.\r\n\r\n\r\n```js\r\nimport img from './image.png'\r\n```\r\n\r\n**webpack.config.js**\r\n```js\r\nmodule.exports = {\r\n module: {\r\n rules: [\r\n {\r\n test: /\\.(png|jpg|gif)$/,\r\n use: [\r\n {\r\n loader: 'url-loader'\r\n options: {\r\n limit: 8192\r\n } \r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}\r\n```\r\n\r\n<h2 align=\"center\">Options</h2>\r\n\r\n|Name|Type|Default|Description|\r\n|:--:|:--:|:-----:|:----------|\r\n|**`limit`**|`{Number}`|`undefined`|Byte limit to inline files as Data URL|\r\n|**`mimetype`**|`{String}`|`extname`|Specify MIME type for the file (Otherwise it's inferred from the file extension)|\r\n|**`prefix`**|`{String}`|`false`|Parameters for the [`file-loader`](https://github.com/webpack-contrib/file-loader) are valid too. They are passed to the file-loader if used|\r\n\r\n### `limit`\r\n\r\nIf the file is greater than the limit (in bytes) the [`file-loader`](https://github.com/webpack-contrib/file-loader) is used and all query parameters are passed to it.\r\n\r\nThe limit can be specified via loader options and defaults to no limit.\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'url-loader',\r\n options: {\r\n limit: 8192\r\n }\r\n}\r\n```\r\n\r\n### `mimetype`\r\n\r\nSet the MIME type for the file. If unspecified the file extensions will be used to lookup the MIME type.\r\n\r\n**webpack.config.js**\r\n```js\r\n{\r\n loader: 'url-loader',\r\n options: {\r\n mimetype: 'image/png'\r\n }\r\n}\r\n```\r\n\r\n### `prefix`\r\n\r\n```js\r\n{\r\n loader: 'url-loader',\r\n options: {\r\n prefix: 'img'\r\n }\r\n}\r\n```\r\n\r\n<h2 align=\"center\">Maintainers</h2>\r\n\r\n<table>\r\n <tbody>\r\n <tr>\r\n <td align=\"center\">\r\n <a href=\"https://github.com/bebraw\">\r\n <img width=\"150\" height=\"150\" src=\"https://github.com/bebraw.png?v=3&s=150\">\r\n </br>\r\n Juho Vepsäläinen\r\n </a>\r\n </td>\r\n <td align=\"center\">\r\n <a href=\"https://github.com/d3viant0ne\">\r\n <img width=\"150\" height=\"150\" src=\"https://github.com/d3viant0ne.png?v=3&s=150\">\r\n </br>\r\n Joshua Wiens\r\n </a>\r\n </td>\r\n <td align=\"center\">\r\n <a href=\"https://github.com/sapegin\">\r\n <img width=\"150\" height=\"150\" src=\"https://github.com/sapegin.png?v=3&s=150\">\r\n </br>\r\n Artem Sapegin\r\n </a>\r\n </td>\r\n <td align=\"center\">\r\n <a href=\"https://github.com/michael-ciniawsky\">\r\n <img width=\"150\" height=\"150\" src=\"https://github.com/michael-ciniawsky.png?v=3&s=150\">\r\n </br>\r\n Michael Ciniawsky\r\n </a>\r\n </td>\r\n <td align=\"center\">\r\n <a href=\"https://github.com/evilebottnawi\">\r\n <img width=\"150\" height=\"150\" src=\"https://github.com/evilebottnawi.png?v=3&s=150\">\r\n </br>\r\n Alexander Krasnoyarov\r\n </a>\r\n </td>\r\n </tr>\r\n <tbody>\r\n</table>\r\n\r\n\r\n[npm]: https://img.shields.io/npm/v/url-loader.svg\r\n[npm-url]: https://npmjs.com/package/url-loader\r\n\r\n[node]: https://img.shields.io/node/v/url-loader.svg\r\n[node-url]: https://nodejs.org\r\n\r\n[deps]: https://david-dm.org/webpack-contrib/url-loader.svg\r\n[deps-url]: https://david-dm.org/webpack-contrib/url-loader\r\n\r\n[tests]: http://img.shields.io/travis/webpack-contrib/url-loader.svg\r\n[tests-url]: https://travis-ci.org/webpack-contrib/url-loader\r\n\r\n[cover]: https://coveralls.io/repos/github/webpack-contrib/url-loader/badge.svg\r\n[cover-url]: https://coveralls.io/github/webpack-contrib/url-loader\r\n\r\n[chat]: https://badges.gitter.im/webpack/webpack.svg\r\n[chat-url]: https://gitter.im/webpack/webpack\r\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/webpack/url-loader/issues"
},
"_id": "url-loader@0.5.9",
"dist": {
"shasum": "3c1c2760126fe5d6879528ba7e91c1c67a925aff"
},
"_from": "url-loader@^0.5.8",
"_resolved": "http://registry.npmjs.org/url-loader/-/url-loader-0.5.9.tgz"
}