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

Emit 1:1 ES module library for <script type="module"> usage #11386

Closed
Ciantic opened this issue Jul 13, 2021 · 1 comment
Closed

Emit 1:1 ES module library for <script type="module"> usage #11386

Ciantic opened this issue Jul 13, 2021 · 1 comment
Labels
declined thank you, but respectfully declined

Comments

@Ciantic
Copy link

Ciantic commented Jul 13, 2021

I'd like to be able to emit 1:1 ES module library. If you are making a library, it is not a good thing that Deno gives you only ability to bundle to a single file. The Deno.emit is not working for this purpose as of yet at least.

In general it would be cool if deno could provide a way to emit straightforward ES module library:

matrix.ts -> matrix.js
vector.ts -> vector.js
...

This way the browser usage would be similar as with .ts files. You just import from .js files in your <script type="module"> tags. As an ES module library creator I can't assume everybody uses deno, and I want the ES library imports to be from individual files instead of a bundle for efficiency.

Things that need to change from Deno.emit for it to work:

@kitsonk kitsonk added the declined thank you, but respectfully declined label Jul 13, 2021
@kitsonk
Copy link
Contributor

kitsonk commented Jul 13, 2021

The command line option is and will always be intended for reconsumption by Deno. Deno.emit() would be the way to do this and as mentioned denoland/deno_emit#41 would need to be addressed to avoid further post processing.

@kitsonk kitsonk closed this as completed Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined thank you, but respectfully declined
Projects
None yet
Development

No branches or pull requests

2 participants