formatjs / js-module-formats

Detect different types of javascript modules formats
Other
13 stars 7 forks source link

Make work in a browser (remove fs and vm dependencies) #12

Open justinbmeyer opened 9 years ago

justinbmeyer commented 9 years ago

Would it be possible to make js-module-formats work in the browser? It would have to remove the fs and vm dependency. It doesn't seem like fs is needed or used, and I'm being lazy right now and not tracking down why vm is needed.

I'd like to make https://github.com/bitovi/transpile able to load in the browser with SystemJS. Let me know what you think. Thanks!

justinbmeyer commented 9 years ago

Alright, I un-lazied myself and read the code. I suppose eval in an iframe could be used in a browser so there is no side effects of running the code.

caridy commented 9 years ago

yeah, I have a psuedo-realm polyfill, I can try that.