jongacnik / parcel-resolver-exclude-assets

Excludes paths starting with `assets`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

parcel-resolver-exclude-assets

Tells parcel to skip paths starting with assets. This is useful when you want to process css/js but leave assets (especially ones included in css) alone.

body {
  background-image: url('assets/background.jpg'); /* parcel will now skip resolving this asset */
}

Usage

yarn add parcel-resolver-exclude-assets --dev

.parcelrc

{
  "extends": "@parcel/config-default",
  "resolvers": [
    "parcel-resolver-exclude-assets",
    "@parcel/resolver-default"
  ]
}

Config

You can specify custom paths in your package.json

{
  "resolverExcludeAssets": [
    "assets",
    "images",
    "fonts"
  ]
}

About

Excludes paths starting with `assets`


Languages

Language:JavaScript 100.0%