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

How to require with custom targets? (Aliases? Remappings?) #216

Closed
yang opened this issue Aug 4, 2014 · 3 comments
Closed

How to require with custom targets? (Aliases? Remappings?) #216

yang opened this issue Aug 4, 2014 · 3 comments

Comments

@yang
Copy link

yang commented Aug 4, 2014

With the browserify CLI tool you can specify e.g. browserify -r fs:browserify-fs, but attempting require: ['fs:browserify-fs'] for grunt-browserify fails. I also tried various other combinations involving alias: ['fs:browserify-fs'] and require: ['fs','browserify-fs'], to no avail. Any hints? Thanks!

@tleunen
Copy link
Collaborator

tleunen commented Aug 4, 2014

You're right, it fails with the current version of grunt-browserify. I almost resolved the issue in my PR #215 but your comment confirmed another issue in browserify, not grunt-browserify.

I did a little test with the same command as yours, and with the latest version of browserify, the alias is not created. I filled a bug in the main repo (see browserify/browserify#850)

This should be resolved once we upgrade to a newer version of browserify when the bug is fixed in the main repo.

@jmreidy
Copy link
Owner

jmreidy commented Aug 4, 2014

@tleunen Thanks for running this down! I appreciate the help.

@jmreidy
Copy link
Owner

jmreidy commented Aug 28, 2014

alias should work with both files and module names. Check out the updated basic example.

@jmreidy jmreidy closed this as completed Aug 28, 2014
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

No branches or pull requests

3 participants