RaveJS / rave

Zero-configuration application bootstrap and development
277 stars 8 forks source link

Rave, webpack, browserify compatiblity #32

Open KidkArolis opened 10 years ago

KidkArolis commented 10 years ago

I started talking about the interop issue in this comment https://github.com/RaveJS/rave/issues/26#issuecomment-45028677.

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 commented 10 years ago

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):

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.