Skip to content

eszip 2.2 #160

Description

@dsherret

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
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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions