I have been facing the same error as has been reported in #23:
Module build failed: Error: unsupported type for static module: UnaryExpression
at expression:
!fs
This can be triggered by the following code (similar to the code that breaks in pump):
var fs = require('fs')
if (!fs) console.log('browser')
Once the fix is applied, this will transform to:
if (false) console.log('browser')
static-eval currently does not support typeof or delete operators. It's unclear what should happen in that case, so I've left them 'unsupported' for now. There is a test for that case.
I have been facing the same error as has been reported in #23:
This can be triggered by the following code (similar to the code that breaks in pump):
Once the fix is applied, this will transform to:
static-eval
currently does not supporttypeof
ordelete
operators. It's unclear what should happen in that case, so I've left them 'unsupported' for now. There is a test for that case.