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

test rolldown-vite #154

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

test rolldown-vite #154

wants to merge 12 commits into from

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Jan 24, 2025

todo

examples/react-server

https://github.com/vitejs/vite-ecosystem-ci/blob/rolldown-vite/README-temp.md#vite-environment-examples

  • parseAstAsync
    • for now, use it from rollup/parseAst
  • virtual:copy-server-css.js
    • two rsc builds chunking difference? (the approach is unsound in rollup vite already)
    • the issue is that 2nd rsc build's manifest includes css output which is only available in 1st rsc build.
      • not only css, but also __client-CCH4vHkY.js chunk is included in manifest.
      • it looks like only manifest issue and two builds are mostly working fine.
    • does the same issue happen in standard rolldown-vite watch build?
    • actually it looks like the behavior (stale manifest) is same with rollup/vite, but the difference is that rolldown now generates _client.js (and thus _client.css) in 1st rsc build, which wasn't the case. Maybe I was relying on no side effect elision, which is not working on rolldown?
      but the difference is that previously there are less chunks in rollup and thus manifest entry is overwritten without stale content showing up after 2nd rsc build
    • this will get fixed by fix(build): fix stale build manifest on watch rebuild vitejs/vite#19361
      though we might need to revisit double environment build to avoid this type of issue
$ pnpm -C examples/react-server build
...
error during build:
Build failed with 1 error:
Error: [UNRESOLVED_IMPORT] Error: Could not resolve "/dist/react-server/assets/_client-Qeq15YSF.css" in virtual:copy-server-css.js
   ╭─[virtual:copy-server-css.js:1:8]
   
 1  import "/dist/react-server/assets/_client-Qeq15YSF.css"
           ────────────────────────┬───────────────────────  
                                   ╰───────────────────────── Module not found.
───╯

examples/web-worker

github-merge-queue bot pushed a commit to rolldown/rolldown that referenced this pull request Feb 6, 2025
<!-- Thank you for contributing! -->

### Description

Follow up to #3488. I forgot to
test `emitFile({ type: "chunk" })` case and I just realized it's not
working on
hi-ogawa/vite-environment-examples#154.

Currently, `FileEmitter::emitted_chunks` is not defined during scope
hoisting finalizer, but it looks possible to define it earlier right
after `generate_chunk_name_and_preliminary_filenames` instead of waiting
until `instantiate_chunks`.
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.

1 participant