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 15 commits into
base: main
Choose a base branch
from
Draft

Using Rolldown with Vite v6 #43

wants to merge 15 commits into from

Conversation

sapphi-red
Copy link

@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 rolldown/rolldown#1842 (comment)
build-old -
cli -
cli-module -
config -
csp -
css -
css-codesplit manualChunks
css-codesplit-cjs -
css-dynamic-import rolldown/rolldown#1842
css-lightningcss -
css-lightningcss-proxy -
css-no-codesplit -
css-sourcemap -
data-uri -
define -
dynamic-import rolldown/rolldown#1842, rolldown/rolldown#1843
dynamic-import-inline -
env -
env-nested -
extensions -
external rolldown/rolldown#2041
fs-serve -
glob-import remove empty CSS generate chunk rolldown/rolldown#1842
hmr -
hmr-root - -
hmr-ssr -
html -
import-assertion -
js-sourcemap manualChunks
json -
legacy 🟡pending support system format
lib 🟡pending support umd format
minify - -
module-graph - -
multiple-entrypoints -
nested-deps -
object-hooks object hook sequential
optimize-deps - the rolldown missing export always is error, but the rollup has error or warn level, ref bfc679e
-rolldown/rolldown#2031
- using Array input generate name is not expected, the entry name will be like index~1.js
optimize-deps-no-discovery -
optimize-missing-deps -
preload -
preserve-symlinks -
proxy-bypass -
proxy-hmr -
resolve
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 rolldown/rolldown#1842

missing feature list that was supported by esbuild / rollup

  • watch mode ([Feature Request]: watch mode rolldown#2028)
    • options.watch
    • watcher.on('event', listener)
    • related hooks: shouldTransformCachedModule, watchChange, closeWatcher
    • this.addWatchFile
  • meta on module info: this can be workarounded as it's not part of the public API
  • umd format
  • system format
  • generating multiple formats in one build: output is currently an object instead of an array
  • options.attributes for resolveId hook
  • SourceMap type does not support toString and toUrl: not necessary but better for easier migration
  • 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

improvements needed later on Vite side

native plugin incompatibilities

TODO list for me

@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 4 times, most recently from f2a0e05 to 3cbc479 Compare September 18, 2024 06:41
@sapphi-red sapphi-red force-pushed the rolldown-v6 branch 4 times, most recently from 0561e91 to 1d231ee Compare September 18, 2024 09:09
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.

2 participants