Skip to content

Investigate vite8 AST access via rolldown #925

@grypez

Description

@grypez

Valid observation but not actionable. The plugin only targets vat bundles (third-party library code like viem), not user-authored code with prose strings containing import('foo'). An AST-based approach would add a heavy dependency to build tooling that runs outside lockdown (where most @endo/* AST tools aren't usable). The stripCommentsPlugin in the same pipeline uses the same regex-based approach. The risk of a false positive inside a string literal that also happens to look like a valid module specifier is negligible.

Originally posted by @sirtimid in #919

With vite 8 and rolldown we should investigate if we can get reasonably ergonomic access to the AST during our bundle process, allowing us to directly read and write the module dependency graph. The vite8 beta announcement indicated it was an important feature.

See also: https://vite.dev/guide/api-environment-plugins

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchGathering data in order to make a decision

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions