Open dy opened 4 years ago
We could try that, but I'd rather add a flag instead of detecting the module type, for now at least. Would you be interested in working on a PR for this?
I would, but I have limitation contributing to open-source now, it’s going to take some time (mb a couple of weeks or more)
On Wed, Jul 1, 2020 at 7:00 AM Julian Gruber notifications@github.com wrote:
We could try that, but I'd rather add a flag instead of detecting the module type, for now at least. Would you be interested in working on a PR for this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/juliangruber/browser-run/issues/155#issuecomment-652350889, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJII7IZEMORBVA3NGZUQLRZMJLVANCNFSM4OCF5P6Q .
Trying to come up with node ES module, working both in browser/node. It uses
import
.cat test.js | browser-run
givesWould that be reasonable to detect if input code uses
import
(see is-module) and include script as<script type="module"></script>
?