eszip 2.2
Opened this issue · 0 comments
dsherret commented
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