-
Notifications
You must be signed in to change notification settings - Fork 727
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
Browserify issue #145
Comments
This issue also exists for 2.x. |
If browserify works the same way than webpack. #140 should solve this. A quick fix could be to declare |
Hi, i am the one who asked in chat. Thank you i see the point. I will try that out when it's released. I've also just tried out external, as the browserify docs state: Config in package.json
Programmatic usage:
I have also tried the noParse option. All of this did not work. I am not sure whether i did something wrong here, i'm new to browserify/ts etc. I could imagine that this doesn't work correctly because of tsify. While establishing the build file i had several issues with it going into a similar direction (ignored options or transforms). I would have to investigate further on a detailed reason. But in the meantime: This article (browserify/browserify#1151) states 3 possible solutions for the problem "Requiring a third party standalone browserify module into another browserify build.":
I found a solution for me, in the gulpfile in my init task: (Sry, this is still coffeescript, i encountered this issue while migrating a project to ts)
And in package.json i've added:
My original suggestion was that you use derequire too, because this will be the most unobstrusive way for other developers to use your library. Any further problems will be avoided, people can simply do require('inversify') without any further settings or workarounds. But as you want to deploy a lib version too, this is probably unnecessary. |
Hi @KarolBuchta I'm just going to wait until the next alpha release to see if fixes this. It should be at some time this week. Will get back as soon as I do a new release. |
@KarolBuchta I have assign it to you. Thanks a lot for helping me with this 😄 |
Hi, I reinstalled the inversify node module, removed my browserify shim (which made the thing break before), and tested again with alpha.8. I have tested the new configuration with the exact same conditions in my build. It works with the new lib folder, together with the setting for main: "lib/inversify.js" in package.json. @hourliert You were right, it works the same way in browserify as in webpack, i checked it in the docs. I also checked whether switching the module resolution in browserify to classic, which had no influence as well. I think this issue can be closed. |
@KarolBuchta thanks a lot for spending some time checking this out 👍 |
Need to investigate issue reported in the support chat:
The text was updated successfully, but these errors were encountered: