-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including envify as a transform causes browserify to throw an error #32
Comments
FTFY 😁 But to answer your question: could you try doing |
😆 Ah @yoshuawuyts you are my hero this morning! Thanks again! |
But after looking at the code I'm confused as to why this works? It looks like including the base project actually calls custom with Any idea on why this actually works? |
I believe the files are used as follows:
Not entirely sure why this is how it is, pretty sure we could do a better job (': |
For someone who stumbled across this ticket with the same confusing problem: From the example:
Should actually be:
(The default version of |
@damncabbage: saved me after hours of debugging. This should go into the README.md. |
This is odd.
If I do:
browserify -t envify entrypoint.js
it will work.
However, if I do:
browserify('entrypoint.js').transform(require('envify')()).bundle()
browserify will crash with:
If I remove the
.transform
call everything works correctly.browserify 10.2.6 (as well as 11.0.1)
envify 3.4.0
I've created a simple test case here: https://github.com/toddself/envify-example
if you do
node bundle.js
you'll see the error. if you remove the call to.transform
it'll work. (it doesn't matter if you put envify in the.transform
call or in thetransform
keys inpackage.json
-- they both fail). However, if you donode_modules/.bin/browserify -t envify entrypoint.js
it'll work...The text was updated successfully, but these errors were encountered: