Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 19, 2024 via pnpm

resolve-url-loader 5.0.0

Webpack loader that resolves relative paths in url() statements based on the original source file
Package summary
Share
0
issues
3
licenses
10
MIT
2
BSD-3-Clause
1
ISC
Package created
13 Aug 2015
Version published
17 Jan 2022
Maintainers
1
Total deps
13
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
10 Packages, Including:
adjust-sourcemap-loader@4.0.0
big.js@5.2.2
convert-source-map@1.9.0
emojis-list@3.0.0
json5@2.2.3
loader-utils@2.0.4
nanoid@3.3.7
postcss@8.4.38
regex-parser@2.3.0
resolve-url-loader@5.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
source-map-js@1.2.0
source-map@0.6.1

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
picocolors@1.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of resolve-url-loader 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
adjust-sourcemap-loader4.0.011.36 kBMIT
prod
convert-source-map1.9.03.91 kBMIT
prod
loader-utils2.0.411.46 kBMIT
prod
postcss8.4.38193.21 kBMIT
prod
source-map0.6.1194.96 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does resolve-url-loader do?

The resolve-url-loader is a Webpack loader that rewrites relative paths in url() statements based on the original source file. This becomes particularly useful in situations where your configuration involves compile-to-css files (like SCSS) that can include a whole tree of source files into a single output. By making use of source map, resolve-url-loader correctly maps url() statements to their correlated assets even within a feature based structure. For example, if you have an image bar.png that resides in a feature directory, and it is referenced in _foo.scss as url(bar.png), the resolve-url-loader rewrites the url as url(features/bar.png) ensuring it correctly points to the asset.

How do you use resolve-url-loader?

The use of resolve-url-loader involves installing the package via npm or yarn, and then configuring it within your Webpack configuration. Here's an example:

First, you install the loader:

npm install resolve-url-loader --save-dev

or

yarn add resolve-url-loader --dev

Then, within your webpack.config.js you specify resolve-url-loader between sass-loader and css-loader:

rules: [
  {
    test: /\.scss$/,
    use: [
      ...
      {
        loader: 'css-loader',
        options: {...}
      }, {
        loader: 'resolve-url-loader',
        options: {...}
      }, {
        loader: 'sass-loader',
        options: {
          sourceMap: true,
          sourceMapContents: false
        }
      }
    ]
  },
  ...
]

Note that it's important to use full loader package name and not to omit -loader in the loader names.

Where are the resolve-url-loader docs?

The resolve-url-loader docs are provided in the README file on the package's GitHub page at https://github.com/bholloway/resolve-url-loader. The documentation covers the problem that resolve-url-loader addresses, its usage, options, limitations, and how to get help in case of issues.