rev-replace-loader
Advanced tools
Comparing version
@@ -6,3 +6,3 @@ var path = require('path') | ||
var query = JSON.parse(this.query.substr(1)) | ||
var manifest = query.manifest || query.manifestPath ? requireManifest(query.manifestPath) : false | ||
var manifest = query.manifest || (query.manifestPath ? requireManifest(query.manifestPath) : false) | ||
@@ -9,0 +9,0 @@ if (manifest) { |
{ | ||
"name": "rev-replace-loader", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Webpack loader to replace asset paths with hashed ones from a rev-manifest.json file", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ Replace rev'd asset references in your production JS compiled with Webpack! | ||
**Source File** | ||
``` | ||
```js | ||
var assetPath = "path/to/asset.jpg" | ||
@@ -11,3 +11,3 @@ ``` | ||
**rev-manifest.json** | ||
``` | ||
```json | ||
{ | ||
@@ -19,3 +19,3 @@ "path/to/asset.jpg": "path/to/asset-78950a808a.jpg" | ||
**Output** | ||
``` | ||
```js | ||
var assetPath = "path/to/asset-78950a808a.jpg" | ||
@@ -22,0 +22,0 @@ ``` |
1830
0.55%