-
-
Notifications
You must be signed in to change notification settings - Fork 87
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 v5 support, update tests, and add some comments #83
Conversation
Thanks, looks good, I'll be happy to merge this once the above changes were done (basically include only changes necessary to fix the issue) and below questions clarified. I'm not sure how the How will it work when the package is used as a library and has the transform applied automatically solely based on information inside the |
- Update tests - Add note about full-paths requirement
@thlorenz there is a --full-paths options on the command line (updated the README.md to reflect) I am not sure if there is a way to configure fullPaths from package.json; as far as I am aware you cannot set browserify options in package.json (unless I am mistaken). All changes also have been completed in your regard to comments. |
@AlexRiedler if we cannot set this option from Could you create an issue in browserify to find out if it can be configured (link this PR there). |
@AlexRiedler, thanks for submitting this, I was trying to QA it using this fork but it still can't find the angluar module, can you please take a look at that repo. Context: The original repo is working with browserify v3.41.0 and browserify-shim v3.4.1, in the above fork I've update browserify to v5.10.0 and browserify-shim to your latest commit 4ae5b5c and added Let me know if I've missed something to make it work. |
@osama-lionheart it looks like the nested dependency is failing, as in angular-route requires angular and for some reason cannot find it... (looking at stack trace currently). It seems that it is using the other require and not the browserify_shim_require for some reason ; that is as far as I got debugging it before I started work today. |
@osama-lionheart did this work with an older version of browserify? @AlexRiedler currently on vacation, so will have a look on the weekend. Wanna explore the possibility of resolving the paths instead of depending on |
@thlorenz, yes
|
I got this to work with and without I'm also testing against all major browserify versions now. So closing this PR since not relying on @osama-lionheart can you please test against the next version of b-shim? It is published as |
@thlorenz, I just tested against the test repo that I forked and I'm still experiencing the same issue:
As far as I can see from the commits, you've fixed the tests (which fixed the warning that we were getting while installing this against browserify v5+) but I don't think it addresses the original issue reproduced in the above test repo. Is there anything I can do to help debugging this? |
That is odd since none of the browserify-shim code changed from one version to the next (only the tests). |
yes, that's my point, I think we had two issues one is to fix the tests, which I think is now resolved, but another one is to fix functionality described in #40 but against browserify v5, which is what the test repo is trying to test actually. |
@osama-lionheart just to clarify if you use older browserify version everything works fine right? It'd be very helpful to generate a smaller test case from the sample repo, i.e. like here. Seems to me it'd be similar to the That way we have a failing test and can work on fixing that. |
Thanks, I'll have a look, but if I understand you correctly, the change has to be applied to browserify right? |
@thlorenz, actually I thought the issue was with browserify-shim, but I've just created a commonjs files and tried to use the same multiple bundles technique, and I found that the issue is with browserify itself, so no work is required for this here. Also I've found the issue reported here: browserify/browserify#860 |
Thank you. I'll hold off on merging your PR with the test until the issue with browserify is solved. |
Actually I found out how to do it correctly in browserify v5, we just needed to use the expose property, please see my update pull-request, now the test is passing against both v4 and v5. |
Update tests so they all pass for browserify v5.10+ ; note that fullpaths: true must occur (there is probably a way around this but we can do it in a future version). Note this also version bumps to v4.0.0 respectively.
require(entry) does not apply transformations anymore in browserify for some reason; I am not sure if this is a bug or intended behaviour, that is why I moved the entry points into the main browserify function in tests. Fixes #78