asset-map-webpack-plugin
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -15,2 +15,4 @@ "use strict"; | ||
var url = _interopRequire(require("url")); | ||
var RequestShortener = _interopRequire(require("webpack/lib/RequestShortener")); | ||
@@ -37,3 +39,3 @@ | ||
}).reduce(function (acc, m) { | ||
acc[m.name] = path.join(publicPath, m.asset); | ||
acc[m.name] = url.resolve(publicPath, m.asset); | ||
return acc; | ||
@@ -53,3 +55,3 @@ }, {}); | ||
}).map(function (f) { | ||
return path.join(publicPath, f); | ||
return url.resolve(publicPath, f); | ||
}) | ||
@@ -56,0 +58,0 @@ }; |
{ | ||
"name": "asset-map-webpack-plugin", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Webpack plugin that creates a map of assets to public url slug for server agnostic usage.", | ||
@@ -13,2 +13,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"url": "^0.10.3", | ||
"webpack": "^1.5.3" | ||
@@ -15,0 +16,0 @@ }, |
import fs from 'fs'; | ||
import path from 'path'; | ||
import url from 'url'; | ||
import RequestShortener from 'webpack/lib/RequestShortener'; | ||
@@ -25,3 +26,3 @@ | ||
}).reduce((acc, m) => { | ||
acc[m.name] = path.join(publicPath, m.asset); | ||
acc[m.name] = url.resolve(publicPath, m.asset); | ||
return acc; | ||
@@ -41,3 +42,3 @@ }, {}); | ||
.filter(f => path.extname(f) !== '.map') | ||
.map(f => path.join(publicPath, f)) | ||
.map(f => url.resolve(publicPath, f)) | ||
}; | ||
@@ -44,0 +45,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82054
29
1068
2
7
+ Addedurl@^0.10.3
+ Addedpunycode@1.3.2(transitive)
+ Addedquerystring@0.2.0(transitive)
+ Addedurl@0.10.3(transitive)