parcel-plugin-url-loader

1.3.1 • Public • Published

parcel-plugin-url-loader

JavaScript Style Guide DUB

use base64 encode file in js and css(includes sass/less etc.)

the plugin will unlink file in production(parcel env)

Installation

yarn add parcel-plugin-url-loader --dev
  or
npm i parcel-plugin-url-loader --save-dev

Usage

✨✨✨ If you have used url-loader in webpack, you'll feel familiar with it

there is default options

{
  "url-loader": {
    "exts": ["jpg", "jpeg", "png", "gif", "svg"],
    "limit": 10240
  }
}

if you want to have your configuration

first of all, you should touch .parcelrc in root path of your project

.parcelrc

{
  "url-loader": {
    "exts": ["jpg", "png"],
    "limit": 66666
  }
}

Package Sidebar

Install

npm i parcel-plugin-url-loader

Weekly Downloads

773

Version

1.3.1

License

MIT

Unpacked Size

115 kB

Total Files

16

Last publish

Collaborators

  • senze.fan