Skip to content
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

support for using a custom modules dir for third party modules #107

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

AshHeskes
Copy link

I've added support for passing a root relative dir for looking up third party modules ala node_modules style as explained here

Command Line Usage

cjsifiy app.js --root js/ --modules-dir components/ 

Node Usage

cjsify ( './app.js', __dirname + '/js', { modulesDir : './components' } );

The docs have also been updated.

@vendethiel
Copy link
Contributor

Oh my, yes!

@AshHeskes
Copy link
Author

The build is failing at aliasing core modules, which is outside of the scope of my pull request. I was going to open an issue for that anyway, because it appears aliasing just doesn't work in general.

@AshHeskes
Copy link
Author

IMO cjs-everywhere shouldn't be responsible for shimming the node env or providing alternatives to node core modules anyway. It should be the job of the dev to utilise packages that are designed for/work with the platform they are targeting.

@michaelficarra
Copy link
Owner

Can you explain how aliasing doesn't work? We have a significant number of tests for the feature and the latest master build on Travis-CI passed. If you think there is a bug, please open an issue for it. Otherwise, please fix this PR to pass CI before review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants