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

require.resolve & improved Node compatibility #21

Open
mattdesl opened this issue Jul 29, 2015 · 2 comments
Open

require.resolve & improved Node compatibility #21

mattdesl opened this issue Jul 29, 2015 · 2 comments

Comments

@mattdesl
Copy link
Collaborator

require.resolve does not work with hihat --node
(related: browserify/browserify#1340)

More generally, since --node is still being run through browserify, it has a few other limitations like module.filename. It would be better if --node were to just use Electron's node integration directly, however this has a lot of other implications like:

  • we would need to maintain our own file watcher that handles module dependencies
  • no support for browser transforms like glslify / babelify / etc
  • can't take advantage of 'browser' field resolution

With all this in mind, it seems a bit out of scope for a (primarily browser-based) tool like hihat.

@audionerd
Copy link

Is there any workaround for the require.resolve issue currently? Could node-resolve be injected somehow?

@mattdesl
Copy link
Collaborator Author

mattdesl commented Aug 3, 2015

No, it's a bit tricky to fix I think. 😟

What is your use case? I think for typical node source it would be better to avoid browserify altogether. I'm exploring some ways of abstracting Hihat into more general purpose modules for this use case.

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

2 participants