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
|
if (tmp && tmp.resolvedBy !== "vite:resolve") { |
https://github.com/rolldown/rolldown/blob/2280eb2298e42835c8d1049a5b32486693c45d0e/packages/rollup-tests/src/ignored-by-unsupported-features.md?plain=1#L13-L14
resolveId hook resolvedBy not supported (1)
import attribute is not supported
|
const type = getDenoType(id, options.attributes.type ?? "default"); |
There are some blockers to update Vite 8 and migrate rollup to rolldown.
ref:
Vite 8
requires
node:util.parseEnvVite 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=nativeIt fails to resolve module without appending the flag. It seems to be a breaking change for
@fresh/plugin-vite.https://vite.dev/config/#configuring-vite
Rolldown
.cjsfiles transformed to ESM, then parsed as CommonJSThe SSR build errors such as
Cannot use export statement outside a moduleorCannot 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 modulestests failedseems to be requires:
resolveIdhookresolvedByis not supportedfresh/packages/plugin-vite/src/plugins/deno.ts
Line 93 in 0ab5a2a
https://github.com/rolldown/rolldown/blob/2280eb2298e42835c8d1049a5b32486693c45d0e/packages/rollup-tests/src/ignored-by-unsupported-features.md?plain=1#L13-L14
import attribute is not supported
fresh/packages/plugin-vite/src/plugins/deno.ts
Line 146 in 0ab5a2a