electrode-cdn-file-loader
Advanced tools
Comparing version 1.0.0 to 1.1.0
21
index.js
@@ -1,3 +0,5 @@ | ||
var loaderUtils = require("loader-utils"); | ||
"use strict"; | ||
const loaderUtils = require("loader-utils"); | ||
module.exports = function (content) { | ||
@@ -9,5 +11,11 @@ this.cacheable && this.cacheable(); | ||
var query = loaderUtils.parseQuery(this.query); | ||
var name = query.name || "[hash].[ext]"; | ||
var url = loaderUtils.interpolateName(this, name, { | ||
const tof = typeof this.query; | ||
let query = {}; | ||
if (tof === "object") { | ||
query = this.query; | ||
} else if (tof === "string") { | ||
query = loaderUtils.parseQuery(this.query); | ||
} | ||
const name = query.name || "[hash].[ext]"; | ||
const url = loaderUtils.interpolateName(this, name, { | ||
context: query.context || this.options.context, | ||
@@ -20,4 +28,4 @@ content: content, | ||
var cdn = "var url = " + JSON.stringify(url) + ";\n" + | ||
"var cdnUrl = typeof _wml !== \"undefined\" && _wml.cdn && _wml.cdn.map(url);\n"; | ||
const cdn = "const url = " + JSON.stringify(url) + ";\n" + | ||
"const cdnUrl = typeof _wml !== \"undefined\" && _wml.cdn && _wml.cdn.map(url);\n"; | ||
@@ -28,2 +36,1 @@ return cdn + "module.exports = cdnUrl || __webpack_public_path__ + url;"; | ||
module.exports.raw = true; | ||
{ | ||
"name": "electrode-cdn-file-loader", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Webpack CDN file loader", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "node ./b" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/electrode-io/cdn-file-loader.git" | ||
"url": "https://github.com/electrode-io/electrode-cdn-file-loader.git" | ||
}, | ||
@@ -17,4 +17,4 @@ "keywords": [], | ||
"dependencies": { | ||
"loader-utils": "^0.2.12" | ||
"loader-utils": "^1.1.0" | ||
} | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
26
1
1439
3
1
+ Addedbig.js@5.2.2(transitive)
+ Addedemojis-list@3.0.0(transitive)
+ Addedjson5@1.0.2(transitive)
+ Addedloader-utils@1.4.2(transitive)
+ Addedminimist@1.2.8(transitive)
- Removedbig.js@3.2.0(transitive)
- Removedemojis-list@2.1.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedloader-utils@0.2.17(transitive)
- Removedobject-assign@4.1.1(transitive)
Updatedloader-utils@^1.1.0