Skip to content

[Tracking] native compatibility alignment for rolldown-vite plugins #4973

@shulaoda

Description

@shulaoda

Ported Plugins

We mark a plugin as aligned when its behavior generally matches the original Vite plugin. However, some differences may still exist but considered non-blocking:

  • Certain edge cases may not yet be fully handled
  • AST polyfill logic caused by regex-based matching will not be aligned (see vitejs/vite#14006)
  • The info and warn messages may be inconsistent, since this.info / this.warn are not yet supported in plugin context

.

  • aliasPlugin
    • ~~Currently, ~~~~\~\~customResolver\~\~~~ is not supported due to potential performance concerns. -> The main difficulty is wrapping the Node-side context for standalone plugin hooks, since Rolldown currently wraps all plugins through the JS-side context.
    • Support 'vite:alias': { noResolved: true } meta data
  • buildImportAnalysisPlugin
    • Port renderChunk hook logic
    • Port generateBundle hook logic (related to asset and css plugins)
  • dataUriPlugin (builtin)
  • dynamicImportVarsPlugin
  • importGlobPlugin
  • jsonPlugin
  • loadFallbackPlugin
  • manifestPlugin
    • css and assets options are not yet supported as they depend on chunk.viteMetadata. More details ↗
  • modulePreloadPolyfillPlugin
  • reporterPlugin
  • transformPlugin
  • resolvePlugin (aligned by @sapphi-red)
  • wasmFallbackPlugin
  • wasmHelperPlugin
    • Requires fileToUrl logic, which should be ported from the asset plugin. See reference ↗
  • webWorkerPostPlugin
  • definePlugin
    • Implemented in rolldown-vite because it relies on the options hook, which exists on the JS side

Awaiting Porting

  • assetPlugin
  • assetImportMetaUrlPlugin
  • cssPlugin
  • htmlPlugin
  • workerPlugin
  • workerImportMetaUrl

Related Issues

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions