Tracking Vite 8, rolldown issues for `@fresh/plugin-vite`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- deno, typescript, vite
- Domain
- build-system, devtools
Research direction
Start with the Vite 8 and Rolldown failures listed here, then read the referenced changes in PRs #3760 and #3765 and the deno.ts locations at lines 93 and 146. Reproduce the reported config resolution, SSR build, CSS modules, resolveId, and import attribute issues; the issue does not name tests for each failure. Done means establishing which blockers affect @fresh/plugin-vite and documenting or addressing them so the Vite 8 and Rolldown migration can proceed.
Written by the indexing model from the issue text.
Description
There are some blockers to update Vite 8 and migrate rollup to rolldown.
ref:
Vite 8
requires node:util.parseEnv
Vite 8 requires node:util.parseEnv. So users need to update deno to 2.7.0 or some workaround for themselves.
requires an another cli flag vite --configLoader=native
It fails to resolve module without appending the flag. It seems to be a breaking change for @fresh/plugin-vite.
% cd www
% deno task dev
Task dev vite
...
vite.config.ts (2:22) [UNRESOLVED_IMPORT] Warning: Could not resolve '@fresh/plugin-vite' in vite.config.ts
╭─[ vite.config.ts:2:23 ]
│
2 │ import { fresh } from "@fresh/plugin-vite";
│ ──────────┬─────────
│ ╰─────────── Module not found, treating it as an external dependency
───╯
https://vite.dev/config/#configuring-vite
Alternatively, if you're using an environment that supports TypeScript (e.g. node --experimental-strip-types), or if you're only writing plain JavaScript, you can specify --configLoader native to use the environment's native runtime to load the config file. Note that updates to modules imported by the config file are not detected and hence would not auto-restart the Vite server.
Rolldown
.cjs files transformed to ESM, then parsed as CommonJS
The SSR build errors such as Cannot use export statement outside a module or Cannot use import statement outside a module.
The approach of this PR seems to be resolve the problem. It could be adopt same for rolldown.
vite build - css modules tests failed
seems to be requires:
resolveId hook resolvedBy is not supported
resolveId hook resolvedBy not supported (1)
import attribute is not supported
- Dominant language
- TypeScript
- Stars
- 13.8k
- Forks
- 757
- Avg merge
- 3m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from freshframework/fresh
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
freshframework/fresh#3920 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
freshframework/fresh#3833 ·
-
feat
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
freshframework/fresh#3803 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
freshframework/fresh#3918 · 1 comment · 4 reactions ·
-
Tab title doesn't update to <Head> <title> when navigating to a page with another <title>Possibly taken @1AbdullahButt claimed this 7 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 57/100
freshframework/fresh#3916 ·
All issues in freshframework/fresh
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tintinweb/pi-subagents#459 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
danielmiessler/LifeOS#2830 ·
Maintainers usually reply within 6 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: client enhancement priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
opensro-dev/opensro#3681 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day