gulp-fingerprint icon indicating copy to clipboard operation
gulp-fingerprint copied to clipboard

requiring rev-manifest

Open Melonbwead opened this issue 10 years ago • 2 comments

Just going through the doc atm, im getting problem on requiring the rev-manifest.json file.

var manifest = require('../../dist/rev-manifest');

I get this error Error: Cannot find module './path/to/rev-manifest'. Does require not work for json files anymore, and has to be modules ?

Should it be:

var manifest = '../../dist/rev-manifest';

Melonbwead avatar Aug 19 '14 13:08 Melonbwead

@adrianchen19888 require works fine for JSON files, make sure your path is correct.

kflorence avatar Sep 10 '14 01:09 kflorence

Had the same problem. Nothing worked, except:

var manifest = require(__dirname + '../../dist/rev-manifest');

gregory90 avatar Dec 18 '14 19:12 gregory90