Skip to content
Open
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
53f9667
chore: add codeSPlitting support
maiieul Feb 20, 2026
dfccc17
fix: cache Map for passing meta object to QwikChunkingFunction
maiieul Feb 23, 2026
70b3dbb
fix: semver
maiieul Feb 23, 2026
34f88f5
💩
maiieul Feb 23, 2026
ecfa2e7
fix: versions type mismatches
maiieul Feb 23, 2026
a4c014c
chore: pnpm dedupe for modular-forms
maiieul Feb 23, 2026
b363c8e
chore: peer deps to latest
maiieul Feb 23, 2026
5064dde
fix: ts-expect-error incompatible types
maiieul Feb 23, 2026
4f01dd5
fix: syncpack
maiieul Feb 23, 2026
e293cbe
fix: input src dir normalization
maiieul Feb 24, 2026
0dc462c
fix: this.meta undefined
maiieul Feb 25, 2026
cd50c88
test: refactor and regression test
maiieul Feb 25, 2026
72e3836
test(preloader.unit.ts): disable comments in preloader.mjs output
maiieul Feb 25, 2026
2d2089e
test(qwikloader.unit.ts): update snapshot with new vite minification
maiieul Feb 25, 2026
4c538e8
fix: docs Prism not found
maiieul Feb 25, 2026
50249dc
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 17, 2026
e2822dd
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 20, 2026
f2e3da5
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 22, 2026
291eacb
fix: rolldown preloading and user overrides
maiieul Mar 22, 2026
7178a14
chore: update peer deps
maiieul Mar 22, 2026
013a184
fix: adapters extendConfig types
maiieul Mar 22, 2026
207ad07
chore: pnpm dedupe
maiieul Mar 22, 2026
a817b66
chore: downgrade qwik.dev/tools
maiieul Mar 22, 2026
50d0945
test: plugins vite.unit.ts
maiieul Mar 22, 2026
9a11cbc
test: preloader.unit.ts
maiieul Mar 22, 2026
6ba2fb3
test: bundle-graph.unit.ts
maiieul Mar 22, 2026
313086f
test: qwikloader.unit.ts
maiieul Mar 22, 2026
3904c4d
fix: remove old plugin.ts code and useless serverSegments
maiieul Mar 22, 2026
14e319f
refactor: bring back resolve.bind(this)
maiieul Mar 22, 2026
b0c58ab
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 23, 2026
3c25780
chore: fix ctx.load for rolldown
maiieul Mar 23, 2026
92ab621
chore: dedupe from old lockfile
maiieul Mar 23, 2026
5d43063
fix: if rolldownVersion block
maiieul Mar 23, 2026
4ffd487
fix: .w() optimizer non ident expressions
maiieul Mar 23, 2026
f90aace
test: style.e2e.ts
maiieul Mar 23, 2026
91b2c30
test: optimizer snapshots
maiieul Mar 23, 2026
e848ca7
chore: pnpm dedupe
maiieul Mar 23, 2026
69f9a53
chore: remove tailwind postcss
maiieul Mar 23, 2026
b4ea97f
chore: update to rolldown rc 11
maiieul Mar 23, 2026
425f88a
chore: re-add tailwind postcss
maiieul Mar 23, 2026
daf0985
refactor: simplify manual meta segment caching
maiieul Mar 23, 2026
21040e3
chore: unused eslint disable console.log comment
maiieul Mar 24, 2026
1038068
chore: console.log
maiieul Mar 24, 2026
d10e9ac
chore: update vite and rolldown to latest
maiieul Mar 25, 2026
9ff6b56
chore(docs): remove prism from ssr.external
maiieul Mar 25, 2026
2993efc
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 25, 2026
253e14d
fix: image-size-server default CJS interop with vte 8
maiieul Mar 25, 2026
2d7ef91
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 26, 2026
eb9e6ee
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 26, 2026
1086580
chore: add rolldown as qwik-vite devDependecies
maiieul Mar 26, 2026
df91829
chore: add prism as docs dependencies
maiieul Mar 26, 2026
0e50fbc
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 26, 2026
280949d
chore: re-add prism to ssr.external
maiieul Mar 26, 2026
a386299
chore: add module.meta manual map comment
maiieul Mar 26, 2026
9268386
Merge branch 'build/v2' into rolldown-vite-support
maiieul Mar 26, 2026
9a564c1
fix: remove normalizePath for validateSource as it depends on rootDir
maiieul Mar 26, 2026
ddb7e79
chore: qwikVite debug sanitized name trim node_modules
maiieul Mar 27, 2026
7c0cef6
fix: pseudo relative src paths
maiieul Mar 27, 2026
edab589
chore: remove debugger statement
maiieul Mar 29, 2026
c61b3f5
Merge branch 'build/v2' into rolldown-vite-support
maiieul Apr 3, 2026
5d75541
Merge branch 'build/v2' into rolldown-vite-support
maiieul Apr 6, 2026
bfcdd29
chore: reset transform.rs back to build/v2 code
maiieul Apr 6, 2026
c3e3f9f
test: qwikloader.unit.ts
maiieul Apr 6, 2026
2d7b7a9
chore: update deps
maiieul Apr 7, 2026
280fb2b
fix: relative src paths handling
maiieul Apr 7, 2026
0a28a10
chore: update docs vite configs to use rolldown
maiieul Apr 7, 2026
dbc1614
refactor: update all vite configs to use rolldownOptions
maiieul Apr 7, 2026
6e1d91c
chore: merge build/v2
maiieul Apr 7, 2026
4ce001e
test: update snapshots
maiieul Apr 8, 2026
f1a4036
test: plugin.unit.ts
maiieul Apr 8, 2026
d929678
chore: update docs-size-results.json
maiieul Apr 8, 2026
9d4d163
test: qwikloader.unit.ts
maiieul Apr 8, 2026
2e82330
Merge branch 'build/v2' into rolldown-vite-support
maiieul Apr 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions e2e/qwik-e2e/apps/preloader-test/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,23 @@ export default defineConfig((): UserConfig => {
],
build: {
minify: false,
rollupOptions: {
rolldownOptions: {
output: {
manualChunks: (id) => {
// Put library code in separate chunks
if (id.includes('vendor-lib')) {
return id;
}
codeSplitting: {
groups: [
{
name: (id) => {
if (id.includes('vendor-lib')) {
return 'vendor';
}
},
},
],
},
comments: true,
},
experimental: {
attachDebugInfo: 'full',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion e2e/qwik-e2e/tests/style.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';

const USE_STYLES_DEDUPE_MARKER = '--use-styles-dedupe-marker: dedupe-ok';
const USE_STYLES_DEDUPE_MARKER = '--use-styles-dedupe-marker:dedupe-ok';

test.describe('styles', () => {
test.beforeEach(async ({ page }) => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"syncpack": {
"versionGroups": [
{
"label": "Be lenient in vite versions for prod. v4 is broken, v5 is good",
"label": "Only accept vite 5 or higher",
"dependencyTypes": [
"prod",
"peer"
Expand Down Expand Up @@ -129,7 +129,7 @@
"@types/semver": "7.7.1",
"@types/tmp": "0.2.6",
"@types/which-pm-runs": "1.0.2",
"@vitejs/plugin-basic-ssl": "2.1.4",
"@vitejs/plugin-basic-ssl": "2.2.0",
"@vitest/coverage-v8": "4.0.18",
"all-contributors-cli": "6.26.1",
"brotli": "1.3.3",
Expand Down Expand Up @@ -169,7 +169,7 @@
"typescript": "5.9.3",
"typescript-eslint": "8.56.1",
"vfile": "6.0.3",
"vite": "7.3.1",
"vite": "8.0.2",
"vite-imagetools": "10.0.0",
"vite-plugin-dts": "4.5.4",
"vite-tsconfig-paths": "6.0.4",
Expand Down
12 changes: 8 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@
"@qwik.dev/partytown": "0.11.2",
"@qwik.dev/react": "workspace:*",
"@qwik.dev/router": "workspace:*",
"@rolldown/browser": "1.0.0-beta.59",
"@rolldown/browser": "1.0.0-rc.12",
"@shikijs/colorized-brackets": "3.21.0",
"@shikijs/langs": "3.21.0",
"@shikijs/rehype": "3.21.0",
"@shikijs/themes": "3.21.0",
"@shikijs/transformers": "3.21.0",
"@shikijs/types": "3.21.0",
"@supabase/supabase-js": "2.53.0",
"@tailwindcss/vite": "4.1.18",
"@tailwindcss/postcss": "4.2.2",
"@tailwindcss/vite": "4.2.2",
"@types/leaflet": "1.9.21",
"@types/prismjs": "1.26.5",
"@types/react": "19.2.7",
Expand All @@ -52,15 +53,18 @@
"react-dom": "19.2.3",
"shiki": "3.21.0",
"snarkdown": "2.0.0",
"tailwindcss": "4.1.18",
"tailwindcss": "4.2.1",
"terser": "5.46.0",
"tsm": "2.3.0",
"typescript": "5.9.3",
"valibot": "1.2.0",
"vite": "7.3.1",
"vite": "8.0.2",
"vite-tsconfig-paths": "6.0.4",
"wrangler": "3.114.17"
},
"dependencies": {
"prismjs": "1.30.0"
},
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0",
"npm": "please-use-pnpm",
Expand Down
10 changes: 9 additions & 1 deletion packages/docs/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function overrideManualChunksForRepl(): Plugin {
enforce: 'post',
config(userConfig) {
const prevOutput = userConfig.build?.rollupOptions?.output;
const prevManualChunks: Rollup.ManualChunksOption | undefined =
const prevManualChunks =
prevOutput && !Array.isArray(prevOutput)
? (prevOutput as Rollup.OutputOptions).manualChunks
: undefined;
Expand Down Expand Up @@ -166,6 +166,14 @@ export default defineConfig(({ mode }) => {
},
ssr: {
resolve: {
external: [
// CJS Prism causes issues with rolldown's bundling
'prismjs',
'prismjs/components/prism-clike',
'prismjs/components/prism-jsx',
'prismjs/components/prism-markup',
'prismjs/components/prism-tsx',
],
noExternal: [
'@mui/material',
'@mui/system',
Expand Down
6 changes: 3 additions & 3 deletions packages/insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@netlify/edge-functions": "3.0.6",
"@qwik.dev/core": "workspace:*",
"@qwik.dev/router": "workspace:*",
"@tailwindcss/vite": "4.1.18",
"@tailwindcss/vite": "4.2.2",
"@types/density-clustering": "1.3.3",
"@types/node": "24.10.0",
"autoprefixer": "10.4.23",
Expand All @@ -30,10 +30,10 @@
"postcss": "8.5.6",
"prettier": "3.7.4",
"prettier-plugin-tailwindcss": "0.7.2",
"tailwindcss": "4.1.18",
"tailwindcss": "4.2.1",
"typescript": "5.9.3",
"typescript-eslint": "8.56.1",
"vite": "7.3.1",
"vite": "8.0.2",
"vite-tsconfig-paths": "6.0.4",
"vitest": "4.0.18",
"zod": "3.25.48"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ q_s_odz7dfdfdM.s(STYLES);
q_s_odzdfdfdM.s(STYLES);


Some("{\"version\":3,\"sources\":[\"/user/qwik/src/test.tsx\"],\"names\":[],\"mappings\":\";;;AACA,SAAS,YAAY,EAAc,QAAQ,EAAa,eAAe,QAAQ,iBAAiB;;;;;;;kBAmBtE;IACpB,MAAM,CAAC,MAAM,GAAG;IAChB,OAAO,MAAM,KAAK;AACnB;kBApBoD;IACxD;IACA;IAEA,MAAM,QAAQ,SAAS;QACtB,OAAO;IACR;IACA,OAAO,WAAW,GAAG,WAAK,mBACf;QACT,WAAW,GAAG,WAAK,iBACR;YACT;sBACA;SACA;QAEF,WAAW,GAAG,WAAI,iBACP,WAAW,GAAG,WAAI;YAC3B,WAAQ;;;iBAME;KAGZ;AAEH;AA5BA,OAAO,MAAM,MAAM,WAAW,GAAG,8BA4BA;AAEjC,OAAO,MAAM,SAAS,uBAAuB;iBA7BtB;gBACA\"}")
Some("{\"version\":3,\"sources\":[\"/user/qwik/src/test.tsx\"],\"names\":[],\"mappings\":\";;;AACA,SAAS,YAAY,EAAc,QAAQ,EAAa,eAAe,QAAQ,iBAAiB;;;;;;;kBAmBtE;IACpB,MAAM,CAAC,MAAM,GAAG;IAChB,OAAO,MAAM,KAAK;AACnB;kBApBoD;IACxD;IACA;IAEA,MAAM,QAAQ,SAAS;QACtB,OAAO;IACR;IACA,OAAO,WAAW,GAAG,WAAK,mBACf;QACT,WAAW,GAAG,WAAK,iBACR;YACT;sBACA;SACA;QAEF,WAAW,GAAG,WAAI,iBACP,WAAW,GAAG,WAAI;YAC3B,WAAQ,oBAG6C;gBACpD;aACA;iBACS;KAGZ;AAEH;AA5BA,OAAO,MAAM,MAAM,WAAW,GAAG,8BA4BA;AAEjC,OAAO,MAAM,SAAS,uBAAuB;iBA7BtB;gBACA\"}")
== DIAGNOSTICS ==

[]
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const qwikifyQrl_component_zH94hIe0Ick = (props)=>{
};


Some("{\"version\":3,\"sources\":[\"/user/qwik/node_modules/@qwik.dev/react/index.qwik.mjs\"],\"names\":[],\"mappings\":\";;;;;;;;;;;;;gDAM8C,CAAC;IAC7C,MAAM,CAAC,YAAY,GAAG;IACtB,MAAM,cAAc;IACpB,MAAM,QAAQ,SAAS,CAAC;IACxB,IAAI;IACJ,IAAI,KAAK,CAAC,iBAAiB,EAAE,MAAM;SAC9B,IAAI,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,EAAE,MAAM;IAC7D;;;;;QA4BI;QACH;IACD;IACA,IAAI,YAAY,CAAC,KAAK,CAAC,cAAc,EAAE;QACtC,MAAM,QAAQ,QAAQ,GAAG,CAAC;YACzB,YAAY,OAAO;YACnB,MAAM,CAAC;SACP,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO;YACrB,MAAM,OAAO,OAAO,MAAM,CAAC,KAAK,YAAY;YAC5C,OAAO,WAAW,GAAG,WAAI;gBACxB,yBAAyB;gBACzB,CAAC,WAAW,EAAE;oBACb;iBACA;;QAEH;QACA,OAAO,WAAW,GAAG,WAAI,sBACd;IAEZ;IACA,OAAO,WAAW,GAAG,WAAI,kBACd,WAAW,GAAG,WAAI;AAE9B\"}")
Some("{\"version\":3,\"sources\":[\"/user/qwik/node_modules/@qwik.dev/react/index.qwik.mjs\"],\"names\":[],\"mappings\":\";;;;;;;;;;;;;gDAM8C,CAAC;IAC7C,MAAM,CAAC,YAAY,GAAG;IACtB,MAAM,cAAc;IACpB,MAAM,QAAQ,SAAS,CAAC;IACxB,IAAI;IACJ,IAAI,KAAK,CAAC,iBAAiB,EAAE,MAAM;SAC9B,IAAI,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,EAAE,MAAM;IAC7D,yDAuBgD;QAC/C;QACA;QACA;QACA;KACA,GAAG;QACH;IACD;IACA,IAAI,YAAY,CAAC,KAAK,CAAC,cAAc,EAAE;QACtC,MAAM,QAAQ,QAAQ,GAAG,CAAC;YACzB,YAAY,OAAO;YACnB,MAAM,CAAC;SACP,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO;YACrB,MAAM,OAAO,OAAO,MAAM,CAAC,KAAK,YAAY;YAC5C,OAAO,WAAW,GAAG,WAAI;gBACxB,yBAAyB;gBACzB,CAAC,WAAW,EAAE;oBACb;iBACA;;QAEH;QACA,OAAO,WAAW,GAAG,WAAI,sBACd;IAEZ;IACA,OAAO,WAAW,GAAG,WAAI,kBACd,WAAW,GAAG,WAAI;AAE9B\"}")
/*
{
"origin": "../node_modules/@qwik.dev/react/index.qwik.mjs",
Expand Down Expand Up @@ -272,7 +272,7 @@ export { qwikify$, qwikifyQrl, renderToString };
export { filterProps as _auto_filterProps };


Some("{\"version\":3,\"sources\":[\"/user/qwik/node_modules/@qwik.dev/react/index.qwik.mjs\"],\"names\":[],\"mappings\":\";AACA,SAAS,YAAY,EAAgG,iBAAiB,QAAQ,iBAAiB;;;;AAI/J,SAAS,WAAW,WAAW;IAC9B,OAAO,WAAW,GAAG;;QA4DjB;QACH,SAAS;IACV;AACD;AACA,MAAM,cAAc,CAAC;IACpB,MAAM,MAAM,CAAC;IACb,OAAO,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,UAAU,CAAC,YAAY,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;IACtD;IACA,OAAO;AACR;AACA,MAAM,WAAW,kBAAkB;AAEnC,eAAe,eAAe,QAAQ,EAAE,IAAI;IAC3C,MAAM,MAAM,MAAM,MAAM,CAAC;IACzB,MAAM,SAAS,MAAM,IAAI,cAAc,CAAC,UAAU;IAClD,MAAM,SAAS,IAAI,iBAAiB,CAAC,OAAO,IAAI;IAChD,MAAM,YAAY,SAAS,OAAO,IAAI;IACtC,OAAO;QACN,GAAG,MAAM;QACT,MAAM;IACP;AACD;AAEA,SAAS,QAAQ,EAAE,UAAU,EAAE,cAAc,GAAG\"}")
Some("{\"version\":3,\"sources\":[\"/user/qwik/node_modules/@qwik.dev/react/index.qwik.mjs\"],\"names\":[],\"mappings\":\";AACA,SAAS,YAAY,EAAgG,iBAAiB,QAAQ,iBAAiB;;;;AAI/J,SAAS,WAAW,WAAW;IAC9B,OAAO,WAAW,GAAG,kDA0DkB;QACtC;KACA,GAAG;QACH,SAAS;IACV;AACD;AACA,MAAM,cAAc,CAAC;IACpB,MAAM,MAAM,CAAC;IACb,OAAO,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,UAAU,CAAC,YAAY,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;IACtD;IACA,OAAO;AACR;AACA,MAAM,WAAW,kBAAkB;AAEnC,eAAe,eAAe,QAAQ,EAAE,IAAI;IAC3C,MAAM,MAAM,MAAM,MAAM,CAAC;IACzB,MAAM,SAAS,MAAM,IAAI,cAAc,CAAC,UAAU;IAClD,MAAM,SAAS,IAAI,iBAAiB,CAAC,OAAO,IAAI;IAChD,MAAM,YAAY,SAAS,OAAO,IAAI;IACtC,OAAO;QACN,GAAG,MAAM;QACT,MAAM;IACP;AACD;AAEA,SAAS,QAAQ,EAAE,UAAU,EAAE,cAAc,GAAG\"}")
== DIAGNOSTICS ==

[]
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export { qwikify$, qwikifyQrl, renderToString };
export { filterProps as _auto_filterProps };


Some("{\"version\":3,\"sources\":[\"/user/qwik/node_modules/@qwik.dev/react/index.qwik.mjs\"],\"names\":[],\"mappings\":\";;AACA,SAAS,YAAY,EAAc,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,QAAQ,iBAAiB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AAK,OAAO;YACrB,MAAM,OAAO,OAAO,MAAM,CAAC,KAAK,YAAY;YAC5C,OAAO,WAAW,GAAG,WAAI;gBACxB,yBAAyB;gBACzB,CAAC,WAAW,EAAE;oBACb;iBACA;;QAEH;QACA,OAAO,WAAW,GAAG,WAAI,sBACd;IAEZ;IACA,OAAO,WAAW,GAAG,WAAI,kBACd,WAAW,GAAG,WAAI;AAE9B;AAaD,MAAM,WAAW,kBAAkB;AAEnC,eAAe,eAAe,QAAQ,EAAE,IAAI;IAC3C,MAAM,MAAM,MAAM,MAAM,CAAC;IACzB,MAAM,SAAS,MAAM,IAAI,cAAc,CAAC,UAAU;IAClD,MAAM,SAAS,IAAI,iBAAiB,CAAC,OAAO,IAAI;IAChD,MAAM,YAAY,SAAS,OAAO,IAAI;IACtC,OAAO;QACN,GAAG,MAAM;QACT,MAAM;IACP;AACD;AAEA,SAAS,QAAQ,EAAE,UAAU,EAAE,cAAc,GAAG\"}")
== DIAGNOSTICS ==

[]
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const App_component_AkbU84a8zes = ()=>{
};


Some("{\"version\":3,\"sources\":[\"node_modules/dep/dist/lib.mjs\"],\"sourceRoot\":\"/path/to/app/\",\"names\":[],\"mappings\":\";;;;;MAKM,UAAU;IACf,OAAO,SAAS;QACf,OAAO;IACR;AACD;;;;yCAEyD;IACxD,MAAM,QAAQ;IACd,OAAO,WAAW,GAAG,WAAK,mBACf;QACT,WAAW,GAAG,WAAK,iBACR;YACT;sBACA;SACA;QAEF,WAAW,GAAG,WAAI,iBACP,WAAW,GAAG,WAAI;YAC3B,WAAQ;;;iBAME;KAGZ;AAEH\"}")
Some("{\"version\":3,\"sources\":[\"node_modules/dep/dist/lib.mjs\"],\"sourceRoot\":\"/path/to/app/\",\"names\":[],\"mappings\":\";;;;;MAKM,UAAU;IACf,OAAO,SAAS;QACf,OAAO;IACR;AACD;;;;yCAEyD;IACxD,MAAM,QAAQ;IACd,OAAO,WAAW,GAAG,WAAK,mBACf;QACT,WAAW,GAAG,WAAK,iBACR;YACT;sBACA;SACA;QAEF,WAAW,GAAG,WAAI,iBACP,WAAW,GAAG,WAAI;YAC3B,WAAQ,qDAG6C;gBACpD;aACA;iBACS;KAGZ;AAEH\"}")
/*
{
"origin": "../../node_modules/dep/dist/lib.mjs",
Expand Down
49 changes: 37 additions & 12 deletions packages/optimizer/core/src/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ pub struct SegmentData {
pub hash: Atom,
pub need_transform: bool,
pub migrated_root_vars: Vec<ast::ModuleItem>,
/// When the bundler inlines capture variables, the explicit captures array
/// from inlinedQrl may contain non-Ident expressions. We preserve the original
/// array to use directly in the .w() call, bypassing scoped_idents.
pub raw_capture_exprs: Option<ast::ArrayLit>,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -577,18 +581,30 @@ impl<'a> QwikTransform<'a> {
folded
};

// When explicit captures are provided (third arg of inlinedQrl), we always preserve
// the original array for the .w() call. The function body has _captures[N] indices
// that match this array's order, so it must be passed through as-is. This is
// important because bundlers (e.g. Rolldown) may inline capture variables before
// our optimizer runs, turning simple Idents into complex expressions.
let mut raw_capture_array: Option<ast::ArrayLit> = None;
let scoped_idents = {
if let Some(scoped) = third_arg {
// Explicit captures provided as third argument
match &*scoped.expr {
ast::Expr::Array(array) => array
.elems
.iter()
.flat_map(|item| match &*item.as_ref().unwrap().expr {
ast::Expr::Ident(ident) => Some(id!(ident)),
_ => None,
})
.collect(),
ast::Expr::Array(array) => {
// Always preserve the original array for .w()
raw_capture_array = Some(array.clone());
// Extract Ident-only entries for scoped_idents (used by segment
// file generation and other bookkeeping, not for .w())
array
.elems
.iter()
.flat_map(|item| match &*item.as_ref().unwrap().expr {
ast::Expr::Ident(ident) => Some(id!(ident)),
_ => None,
})
.collect()
}
_ => vec![],
}
} else {
Expand Down Expand Up @@ -623,6 +639,7 @@ impl<'a> QwikTransform<'a> {
need_transform: false,
hash,
migrated_root_vars: Vec::new(),
raw_capture_exprs: raw_capture_array,
};
// Preprocessed inlinedQrl from libs are always emitted — stripping is meant for user code without the user having to write guards; libs can put guards themselves.
// App-level $() calls go through _create_synthetic_qsegment which has its own strip check.
Expand Down Expand Up @@ -924,6 +941,7 @@ impl<'a> QwikTransform<'a> {
need_transform: false,
hash,
migrated_root_vars: Vec::new(),
raw_capture_exprs: None,
};

return (
Expand Down Expand Up @@ -1001,6 +1019,7 @@ impl<'a> QwikTransform<'a> {
need_transform: true,
hash,
migrated_root_vars: Vec::new(),
raw_capture_exprs: None,
};
let should_emit = self.should_emit_segment(&segment_data);
if should_emit {
Expand Down Expand Up @@ -1922,8 +1941,11 @@ impl<'a> QwikTransform<'a> {
_QRL.clone()
};

// Injects state
if !segment_data.scoped_idents.is_empty() {
// Injects state — prefer the original captures array from inlinedQrl (preserves
// correct indices), otherwise build from scoped_idents for $() calls.
if let Some(ref raw_array) = segment_data.raw_capture_exprs {
args.push(ast::Expr::Array(raw_array.clone()));
} else if !segment_data.scoped_idents.is_empty() {
args.push(ast::Expr::Array(ast::ArrayLit {
span: DUMMY_SP,
elems: segment_data
Expand Down Expand Up @@ -2006,8 +2028,11 @@ impl<'a> QwikTransform<'a> {
_INLINED_QRL.clone()
};

// Injects state
if !segment_data.scoped_idents.is_empty() {
// Injects state — prefer the original captures array from inlinedQrl (preserves
// correct indices), otherwise build from scoped_idents for $() calls.
if let Some(ref raw_array) = segment_data.raw_capture_exprs {
args.push(ast::Expr::Array(raw_array.clone()));
} else if !segment_data.scoped_idents.is_empty() {
args.push(ast::Expr::Array(ast::ArrayLit {
span: DUMMY_SP,
elems: segment_data
Expand Down
2 changes: 1 addition & 1 deletion packages/qwik-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"react": "19.2.3",
"react-dom": "19.2.3",
"typescript": "5.9.3",
"vite": "7.3.1"
"vite": "8.0.2"
},
"engines": {
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/qwik-router/src/buildtime/vite/get-route-imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function isBundlePartOfRoute(bundle: QwikBundle, routeAndLayoutPaths: string[])
}
for (const bundleOrigin of bundle.origins) {
const originPath = removeExtension(bundleOrigin);
return routeAndLayoutPaths.some((path) => path.endsWith(originPath));
if (routeAndLayoutPaths.some((path) => path.endsWith(originPath))) {
return true;
}
}
return false;
}
3 changes: 2 additions & 1 deletion packages/qwik-router/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { defineConfig } from 'vite';
import { compiledStringPlugin } from '../../scripts/compiled-string-plugin.js';
import { ssgWorkerImportPlugin } from './src/buildtime/vite/ssg-worker-imports';
import pkg from './package.json' with { type: 'json' };
import type { UserConfig } from 'vite';

export default defineConfig(() => {
export default defineConfig((): UserConfig => {
return {
build: {
emptyOutDir: false,
Expand Down
3 changes: 2 additions & 1 deletion packages/qwik-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@qwik.dev/qwik-vite",
"private": true,
"devDependencies": {
"image-size": "1.2.1"
"image-size": "1.2.1",
"rolldown": "1.0.0-rc.12"
}
}
Loading
Loading