Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resolve-url-loader

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-url-loader - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

26

index.js

@@ -45,7 +45,23 @@ /*

// process
return rework(content)
.use(reworkPlugin)
.toString({
sourcemap: this.sourceMap || options.sourceMap
});
// rework will throw on css syntax errors
var FILENAME_PLACEHOLDER = '<filename>';
try {
return rework(content, { source: FILENAME_PLACEHOLDER })
.use(reworkPlugin)
.toString({
sourcemap: this.sourceMap || options.sourceMap
});
}
// fail gracefully
catch(exception) {
var message = ('CSS syntax error (resolve-url-loader did not operate)' + exception.message)
.replace(FILENAME_PLACEHOLDER, '');
if (options.fail) {
this.emitError(message);
}
else if (!options.silent) {
this.emitWarning(message);
}
return content; // original content unchanged
}

@@ -52,0 +68,0 @@ /**

2

package.json
{
"name": "resolve-url-loader",
"version": "1.0.3",
"version": "1.1.0",
"description": "Webpack loader that resolves relative paths in url() statements based on the original source file",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,2 +43,5 @@ # Resolve URL Loader

In some use cases (no preceding transpiler) there will be no incoming source map. Therefore we do not warn if the
source-map is missing.
### Apply via webpack config

@@ -72,2 +75,6 @@

* `silent` Do not display warnings on CSS syntax error.
* `fail` Syntax errors will result in an error.
## How it works

@@ -74,0 +81,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc