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