Skip to content
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

Using Rolldown with Vite v6 #43

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

Using Rolldown with Vite v6 #43

wants to merge 174 commits into from

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Sep 12, 2024

Description

Applied changes from #24 and #27 to the main branch after the environment API PR is merged.
Also fixed errors on Windows and cleaned up some unneeded changes.

#24 implemented build-time dep optimization partially, but I didn't include that change in this PR.

e2e test status

Playground Name Dev Build Reasons
alias
assets NOTE: watch mode tests are skipped
assets-sanitize
backend-integration NOTE: changed the test case that was relying on rollup specific chunking behavior (rolldown/rolldown#1842 (comment))
build-old -
cli -
cli-module -
config -
csp -
css -
css-codesplit NOTE: uses advancedChunks instead of manualChunks
css-codesplit-cjs -
css-dynamic-import
css-lightningcss -
css-lightningcss-proxy -
css-lightningcss-root -
css-no-codesplit -
css-sourcemap -
data-uri -
define -
dynamic-import
dynamic-import-inline -
env -
env-nested -
environment-react-ssr -
extensions -
external NOTE: passing with a patch f4c3629
fs-serve -
glob-import -
hmr -
hmr-root - -
hmr-ssr -
html -
import-assertion -
js-sourcemap NOTE: uses advancedChunks instead of manualChunks
json -
legacy 🟡pending support system format
lib -
minify - -
module-graph - -
multiple-entrypoints -
nested-deps -
object-hooks object hook sequential
optimize-deps rolldown/rolldown#2031
optimize-deps-no-discovery -
optimize-missing-deps -
preload -
preserve-symlinks -
proxy-bypass -
proxy-hmr -
resolve NOTE: skipped some browser field related tests as those cases were only supported by esbuild and Vite, also skipped some test that does fallback based on the file content which is Vite only and I believe it should not be done
resolve-config -
ssr -
ssr-alias -
ssr-conditions -
ssr-deps -
ssr-html -
ssr-noexternal - -
ssr-pug -
ssr-resolve - -
ssr-webworker
tailwind -
tailwind-sourcemap -
transform-plugin
tsconfig-json -
tsconfig-json-load-error -
wasm -
worker -

missing feature list that was supported by esbuild / rollup

  • watch mode ([Feature Request]: watch mode rolldown/rolldown#2028)
    • options.watch
    • watcher.on('event', listener)
    • related hooks: shouldTransformCachedModule, watchChange, closeWatcher
    • this.addWatchFile
  • system format
  • options.attributes for resolveId hook
  • resolveImportMeta hook: can use transform hook for Vite's usecase
  • options.preserveEntrySignatures: not necessary but nice for smaller bundles
  • cancelling the running build / scan (esbuild docs): since rolldown is fast, it's not important to have this feature, but would be nice to reduce energy consumption

native plugin incompatibilities

intended behavior differences

TODO list for me

  • fix the types for filter in hooks
  • implement filter in hooks
  • should set rolldown's minify target

Sorry, something went wrong.

@sapphi-red sapphi-red marked this pull request as draft September 12, 2024 07:05
@sapphi-red sapphi-red changed the title Rolldown v6 Using Rolldown with Vite v6 Sep 12, 2024
@sapphi-red sapphi-red force-pushed the rolldown-v6 branch 10 times, most recently from 1d231ee to 2087832 Compare September 18, 2024 09:15
@IWANABETHATGUY
Copy link

IWANABETHATGUY commented Sep 20, 2024

FYI,

alias: does not support customResolver option

this is by design, if use customResolver in native plugin, there is no performance difference between js Alias and rust alias, since you always need to perform a tsfn, and make plugin execute single threaded

@IWANABETHATGUY

This comment was marked as outdated.

@sapphi-red

This comment was marked as outdated.

@sapphi-red

This comment was marked as outdated.

@IWANABETHATGUY

This comment was marked as outdated.

@sapphi-red

This comment was marked as outdated.

@IWANABETHATGUY

This comment was marked as outdated.

@sapphi-red

This comment was marked as outdated.

Copy link

pkg-pr-new bot commented Oct 15, 2024

Open in Stackblitz

npm i https://pkg.pr.new/rolldown/vite@43

commit: 8898545

@IWANABETHATGUY

This comment was marked as resolved.

sapphi-red and others added 17 commits March 3, 2025 17:05

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green
…not used

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Partially verified

This commit is signed with the committer’s verified signature.
sapphi-red’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green

Verified

This commit was signed with the committer’s verified signature.
sapphi-red 翠 / green
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.

None yet

6 participants