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

Rave, webpack, browserify compatiblity #32

Open
KidkArolis opened this issue Jun 5, 2014 · 1 comment
Open

Rave, webpack, browserify compatiblity #32

KidkArolis opened this issue Jun 5, 2014 · 1 comment

Comments

@KidkArolis
Copy link
Contributor

I started talking about the interop issue in this comment #26 (comment).

I'm a bit worried that if someone publishes a module to npm that uses browserify transforms, it's not compatible with rave. If someone would publish a module to npm that uses rave loaders, it wouldn't be compatible with browserify, etc. Should we try to improve this situation? One way is to take browserify as the "standard" in the npm land and try and support all the same things. I.e. map map browserify transforms to rave loaders, etc. and support the same package.json conventions.

@unscriptable
Copy link
Contributor

This is interesting. I have doubts whether we can easily support all browserify transforms, but I scanned a few and they look like they are well-behaved.

Pedantically, the ES6 translate hook is meant to transform to ES6 module format, but does allow devs to translate to other formats, such as node/CommonJS.

One way to solve this problem would be to create a rave-load-browserify extension, which (not in sequential order):

  • reads the browserify.transform option in package.json
  • require()s the browserify.transform module
  • applies an ES6 Loader translate hook that transforms the source code via the browserify.transform module

I'm on the fence whether this is the right way to solve the process.env problem, but it's not bad to have many solutions.

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