babel-plugin-static-fs
babel-plugin-static-fs copied to clipboard
Does not work with __coverage__ or istanbul
I get this error
Error: file.js: Could not statically evaluate how the fs module was required/imported. while parsing file: file.js
When trying to use static-fs
with either babel-plugin-static-fs or babel-plugin-istanbul
i think because the instrumentation does
var fs = (++_cover__().s['2'], require('fs'));
I've figured it out, one has to add
/* istanbul ignore next */
const path = require('path');
/* istanbul ignore next */
const fs = require('fs');
for babel-plugin-istanbul
in order for both plugins to work together. hope that helps.