Skip to content

Rolldown-Vite #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 110 commits into
base: main
Choose a base branch
from
Draft

Rolldown-Vite #84

wants to merge 110 commits into from

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Mar 7, 2025

Description

Current Status

Intended behavior differences

  • esbuild needs to be installed manually in the following cases:
    • when using build.minify: 'esbuild'
    • when using a plugin using transformWithEsbuild function
  • process.env.ROLLDOWN_OPTIONS_VALIDATION = 'loose' may need to be set to allow options not supported by rolldown
  • passing the same browser with multiple versions of it to build.target errors: esbuild selects the latest version of it, but that's probably what you intend
  • transformer: define does not share reference for objects oxc-project/oxc#7641
  • require is never transformed into import, users needs to inject a polyfill on their own, see f4c3629
  • build.rollupOptions.output.manualChunks is not supported. please use build.rollupOptions.output.advancedChunks instead
  • splitVendorChunkPlugin is not supported
  • structuredClone(bundle) errors with DataCloneError: #<Object> could not be cloned.. please clone it with structuredClone({ ...bundle })

Known missing features

related to native plugins
  • alias
    • does not support customResolver option
  • define
    • per-environment config is not supported yet
  • transform
    • does not read tsconfig
    • does not support options
  • dynamic import vars
    • does not support resolving with createResolver
  • import glob
  • build-transform
    • does not support options
  • manifest
    • cannot use data on Vite side (e.g. css/assets)
      • I cannot make a simple reproduction for this one. If you only enable the native manifest plugin and run build in playground/backend-integration, you can see the manifest not containing css and assets field in index.html
TODO list for me
  • setup publish flow
  • set rolldown's minify target

Copy link

pkg-pr-new bot commented Mar 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vitejs/rolldown-vite@84

commit: de8164a

@sapphi-red sapphi-red force-pushed the rolldown-vite branch 2 times, most recently from 9ce2683 to a974a4a Compare March 17, 2025 03:57
@sapphi-red sapphi-red changed the title WIP Rolldown-Vite Mar 17, 2025
@sapphi-red sapphi-red mentioned this pull request Mar 17, 2025
3 tasks
`function(dep, importerUrl) { return new URL(dep, importerUrl).href }`
: // If the base isn't relative, then the deps are relative to the projects `outDir` and the base
// is appended inside __vitePreload too.
`function(dep) { return ${JSON.stringify(environment.config.base)}+dep }`

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
@christianjuth
Copy link

christianjuth commented Mar 25, 2025

Found this PR in the Vite docs. Curious how stable rolldown-vite is. On a scale of "Next.js would call this is stable" to "this will actually work 99% of the time", were are we at?

@sapphi-red sapphi-red force-pushed the rolldown-vite branch 2 times, most recently from 51fd297 to 3fc2ac5 Compare March 26, 2025 02:29
@sapphi-red
Copy link
Member Author

Found this PR in the Vite docs. Curious how stable rolldown-vite is. On a scale of "Next.js would call this is stable" to "this will actually work 99% of the time", were are we at?

I'd say it would work for basic cases as it is passing most tests through out the ecosystem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants