Reputation: 681
The following code generates error: Uncaught TypeError: undefined is not a function
var fs = require('fs');
fs.readFileSync(filename);
Upvotes: 2
Views: 4216
Reputation: 1622
You have to use the brfs transform for this to work: https://github.com/substack/brfs
It will inline the file content into your script.
Upvotes: 3