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

eszip 2.2 #160

Open
dsherret opened this issue Jan 15, 2024 · 0 comments
Open

eszip 2.2 #160

dsherret opened this issue Jan 15, 2024 · 0 comments

Comments

@dsherret
Copy link
Member

dsherret commented Jan 15, 2024

We need to be able to store the raw untranspiled bytes of TypeScript in eszip. For example:

import bytes from "./mod.ts" with { type: "bytes" }; // raw file bytes
import * as mod from "./mod.ts" // js source stored in eszip

Luca's suggestion (something along these lines):

Entry (module with raw source):
| Source offset (4) | Source size (4) | Raw source offset (4) | Raw source size (4) | SourceMap offset (4) | SourceMap size (4) | Module type (1) |

Entry (module with identical raw source):
| Source offset (4) | Source size (4) | SourceMap offset (4) | SourceMap size (4) | Module type (1) |

Then we never emit Entry (module) anymore.

Edit: Nevermind. Need to rethink for this scenario:

import json from "https://deno.land/file.json" with { type: "json" }; // json bytes
import data from "https://deno.land/file.json" with { type: "bytes" }; // some ts file source
import mod from "https://deno.land/file.json"; // some ts file that gets transpiled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant