You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your official recommendation to configure browserify is thru package.json "browserify" property. It works fine (and bankai made a nice job on my project BTW) but unfortunately, if I'm building a library (something that can be required by others) having a browserify configuration in the package.json will probably give an error when my users try to run browserify on their own projects.
Imagine that besides publishing my project in the web, I want to expose some APIs so others can require() my project. In that case, if they use browserify when they try generate the bundle on their projects, browserify will try to run that transformation and, that doesn't make any sense (since it's already compiled). For avoiding the problem I would have to include "babelify" and "babel-core" as "dependency" instead of "devDependency" in my project or manually remove the "browserify" property of my package.json on beforepublish.
So I would recommend you to at least document this, and in the future try to avoid configuring browserify like that - seems that kind of configuration is meant to run browserify when your project's dependencies compile, not when your project does. Also if I'm right you should provide other means of configuration.
Thanks for the tool, seems really good, keep it up !
The text was updated successfully, but these errors were encountered:
I think the one exception to what I said in browserify/browserify#1850 is application level config. You're definitely right though that it collides if you have a library that also includes in its repo an example application using bankai…
Your official recommendation to configure browserify is thru package.json "browserify" property. It works fine (and bankai made a nice job on my project BTW) but unfortunately, if I'm building a library (something that can be required by others) having a browserify configuration in the package.json will probably give an error when my users try to run browserify on their own projects.
See browserify/browserify#1850 for details
An example, I just run bankai on my project which needed this in package.json:
Imagine that besides publishing my project in the web, I want to expose some APIs so others can require() my project. In that case, if they use browserify when they try generate the bundle on their projects, browserify will try to run that transformation and, that doesn't make any sense (since it's already compiled). For avoiding the problem I would have to include "babelify" and "babel-core" as "dependency" instead of "devDependency" in my project or manually remove the "browserify" property of my package.json on beforepublish.
So I would recommend you to at least document this, and in the future try to avoid configuring browserify like that - seems that kind of configuration is meant to run browserify when your project's dependencies compile, not when your project does. Also if I'm right you should provide other means of configuration.
Thanks for the tool, seems really good, keep it up !
The text was updated successfully, but these errors were encountered: