Skip to content

Support Deno With Loader #1207

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

Closed
jtenner opened this issue Apr 3, 2020 · 6 comments
Closed

Support Deno With Loader #1207

jtenner opened this issue Apr 3, 2020 · 6 comments

Comments

@jtenner
Copy link
Contributor

jtenner commented Apr 3, 2020

This is a very easy change. All we need to do is switch to es module exports.

See: https://github.com/crabmusket/deno_assemblyscript_example

Any thoughts?

@MaxGraey
Copy link
Member

MaxGraey commented Apr 3, 2020

Add loader.mjs?

@jtenner jtenner changed the title Support Deno Support Deno Loadrr Apr 3, 2020
@jtenner jtenner changed the title Support Deno Loadrr Support Deno With Loader Apr 3, 2020
@jtenner
Copy link
Contributor Author

jtenner commented Apr 3, 2020

Should we have a module build process and switch the loader to Typescript?

@dcodeIO
Copy link
Member

dcodeIO commented Apr 3, 2020

Some parts of the loader are a bit suboptimal to describe in TS, since it also does some dynamic magic here or there. In such cases I typically prefer to write it in JS right away, since porting to TS only adds complexity.

Should be possible to provide it in ES module form quite easily, though. Just expecting a bit of a hassle to make that a nice hybrid module to publish to npm. Last time I checked node and mjs/non-mjs still used to be unnecessarily painful, but I guess you guys are more up to date there than I am :)

@MaxGraey
Copy link
Member

MaxGraey commented Apr 3, 2020

We could use esm or use some simple and lightweight module which transform esm to cjs as build stage

@stale stale bot added the stale label May 3, 2020
@MaxGraey MaxGraey added enhancement and removed stale labels May 3, 2020
@AssemblyScript AssemblyScript deleted a comment from stale bot May 3, 2020
@jtenner
Copy link
Contributor Author

jtenner commented May 3, 2020

Bootstrapping a module here is a trivial task using the deno/std/node library. I believe there's a problem with the loader itself. Will have to look further.

@dcodeIO
Copy link
Member

dcodeIO commented May 28, 2020

Closing this issue as part of 2020 vacuum as ESM support is now being tracked in #1306, a more general issue also covering this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants