Skip to content

fix(start): preserve dev SSR CSS order#7830

Open
schiller-manuel wants to merge 2 commits into
mainfrom
fix-7794
Open

fix(start): preserve dev SSR CSS order#7830
schiller-manuel wants to merge 2 commits into
mainfrom
fix-7794

Conversation

@schiller-manuel

@schiller-manuel schiller-manuel commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

fixes #7794

Summary by CodeRabbit

  • Bug Fixes

    • Improved development SSR style collection to preserve stable CSS cascade/order.
    • Prevented duplicate collection of imported CSS while still including styles from code-split routes.
    • Ensured imported stylesheet precedence is respected and remains consistent after reloads/invalidation.
  • Tests

    • Expanded end-to-end coverage for dev SSR styles across React, Solid, and Vue, including code-split route styling, CSS import ordering, byte-for-byte reload stability, and @import dependency behavior.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Development SSR CSS collection now uses ordered module-graph traversal, client-side CSS loading, and cached extraction. The change avoids duplicated imports, preserves code-split styles, updates plugin wiring, and adds framework-specific tests for ordering and SSR behavior.

Changes

Development SSR CSS collection

Layer / File(s) Summary
CSS collection and extraction
packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts
Refactors collection around environment-specific loading, deterministic dependency ordering, CSS import filtering, concurrent extraction, and invalidation-aware caching.
Dev middleware integration
packages/start-plugin-core/src/vite/dev-server-plugin/plugin.ts
Uses the new collector contract and client CSS loader while removing the previous CSS-module transform cache wiring.
React SSR fixtures and validation
e2e/react-start/dev-ssr-styles/..., .changeset/fix-dev-ssr-css-order.md
Adds code-split and CSS-import routes with end-to-end checks for cascade order, duplicate imports, and SSR styles.
Solid and Vue SSR fixtures
e2e/solid-start/dev-ssr-styles/..., e2e/vue-start/dev-ssr-styles/..., packages/start-plugin-core/tests/vite/dev-styles.test.ts
Adds Solid and Vue SSR fixtures plus unit coverage for graph traversal, ordering, invalidation, client/server environments, and failed transforms.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant DevStylesMiddleware
  participant collectDevStyles
  participant ViteModuleGraph
  participant ClientDevEnvironment
  Browser->>DevStylesMiddleware: request development styles
  DevStylesMiddleware->>collectDevStyles: pass route entries and CSS loader
  collectDevStyles->>ViteModuleGraph: resolve ordered CSS dependencies
  ViteModuleGraph-->>collectDevStyles: return CSS module nodes
  collectDevStyles->>ClientDevEnvironment: load transformed CSS
  ClientDevEnvironment-->>collectDevStyles: return CSS contents
  collectDevStyles-->>DevStylesMiddleware: return concatenated CSS
  DevStylesMiddleware-->>Browser: serve styles.css
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preserving dev SSR CSS order for Start.
Linked Issues check ✅ Passed The changes address #7794 by preventing duplicated @import CSS and preserving stylesheet order during development SSR.
Out of Scope Changes check ✅ Passed The added fixtures, tests, and plugin refactor all support the CSS ordering fix and do not show unrelated scope creep.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-7794

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 0f55262

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ❌ Failed 13m 52s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 47s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-15 22:16:19 UTC

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

1 package(s) bumped directly, 4 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/start-plugin-core 1.171.20 → 1.171.21 Changeset
@tanstack/react-start 1.168.28 → 1.168.29 Dependent
@tanstack/react-start-rsc 0.1.27 → 0.1.28 Dependent
@tanstack/solid-start 1.168.28 → 1.168.29 Dependent
@tanstack/vue-start 1.168.27 → 1.168.28 Dependent

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 3b9eb9eeb0b2
  • Measured at: 2026-07-15T22:03:07.297Z
  • Baseline source: history:0b178a79e2e8
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Initial gzip Raw Brotli Trend
react-router.minimal 87.35 KiB 0 B (0.00%) 87.21 KiB 273.70 KiB 76.01 KiB ▁██████▄▄▄▄
react-router.full 91.06 KiB 0 B (0.00%) 90.92 KiB 285.59 KiB 79.19 KiB ▁██████▁▁▁▁
solid-router.minimal 35.53 KiB 0 B (0.00%) 35.40 KiB 105.90 KiB 31.94 KiB ▁██████▁▁▁▁
solid-router.full 40.58 KiB 0 B (0.00%) 40.46 KiB 121.11 KiB 36.51 KiB ▁██████▁▁▁▁
vue-router.minimal 53.00 KiB 0 B (0.00%) 52.87 KiB 149.94 KiB 47.63 KiB ▂██████▁▁▁▁
vue-router.full 58.94 KiB 0 B (0.00%) 58.81 KiB 168.70 KiB 52.76 KiB ▅██████▁▁▁▁
react-start.minimal 101.99 KiB 0 B (0.00%) 101.85 KiB 322.13 KiB 88.23 KiB ▁██████▁▁▁▁
react-start.deferred-hydration 102.72 KiB 0 B (0.00%) 101.87 KiB 323.50 KiB 88.88 KiB ▁██████▁▁▁▁
react-start.full 105.36 KiB 0 B (0.00%) 105.23 KiB 332.06 KiB 91.12 KiB ▄██████▁▁▁▁
react-start.rsbuild.minimal 99.68 KiB 0 B (0.00%) 99.51 KiB 316.57 KiB 85.74 KiB ▃██████▁▁▁▁
react-start.rsbuild.minimal-iife 100.08 KiB 0 B (0.00%) 99.91 KiB 317.51 KiB 86.11 KiB ▃██████▁▁▁▁
react-start.rsbuild.full 102.89 KiB 0 B (0.00%) 102.72 KiB 326.63 KiB 88.52 KiB ▃██████▁▁▁▁
solid-start.minimal 49.61 KiB 0 B (0.00%) 49.48 KiB 152.07 KiB 43.83 KiB ▅██████▁▁▁▁
solid-start.deferred-hydration 52.87 KiB 0 B (0.00%) 49.53 KiB 160.11 KiB 46.89 KiB ▅██████▁▁▁▁
solid-start.full 55.42 KiB 0 B (0.00%) 55.29 KiB 169.12 KiB 48.90 KiB ▆██████▁▁▁▁
vue-start.minimal 71.03 KiB 0 B (0.00%) 70.90 KiB 207.19 KiB 62.89 KiB ▇██████▁▁▁▁
vue-start.full 75.03 KiB 0 B (0.00%) 74.90 KiB 219.83 KiB 66.37 KiB ▅██████▁▁▁▁

Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

@pkg-pr-new

pkg-pr-new Bot commented Jul 15, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7830

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7830

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7830

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7830

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7830

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7830

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7830

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7830

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7830

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7830

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7830

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7830

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7830

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7830

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7830

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7830

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7830

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7830

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7830

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7830

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7830

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7830

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7830

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7830

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7830

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7830

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7830

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7830

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7830

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7830

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7830

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7830

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7830

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7830

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7830

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7830

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7830

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7830

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7830

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7830

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7830

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7830

commit: 79d9a70

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css`:
- Line 3: In the stylesheet declaration block, add an empty line between the
custom property and the background-color declaration to satisfy Stylelint’s
declaration-empty-line-before rule.

In `@e2e/react-start/dev-ssr-styles/tests/app.spec.ts`:
- Around line 28-47: Update the CSS response collection in the test around the
page response listener and navigation steps so each navigation records its own
stylesheet response. Capture the response associated with the initial page.goto
separately from the response observed after page.reload, then compare those two
navigation-specific promises instead of taking cssBodies.slice(0, 2).

In `@packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts`:
- Around line 161-162: Update the module classification around isCssFile and
resolveModuleDeps to use node.url rather than the fallback fileOrUrl value,
ensuring virtual Vue style-block URLs with CSS query parameters are recognized
as CSS modules. Add a regression test covering a node whose file is the host
.vue path while its url contains the CSS style query.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7b3be4d-0a24-46c3-a998-c1e7c0fb0b9b

📥 Commits

Reviewing files that changed from the base of the PR and between 0b178a7 and 0f55262.

📒 Files selected for processing (13)
  • .changeset/fix-dev-ssr-css-order.md
  • e2e/react-start/dev-ssr-styles/src/components/CodeSplitStyledBox.tsx
  • e2e/react-start/dev-ssr-styles/src/routeTree.gen.ts
  • e2e/react-start/dev-ssr-styles/src/routes/css-import-order.tsx
  • e2e/react-start/dev-ssr-styles/src/routes/index.tsx
  • e2e/react-start/dev-ssr-styles/src/styles/app.css
  • e2e/react-start/dev-ssr-styles/src/styles/code-split-route.module.css
  • e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css
  • e2e/react-start/dev-ssr-styles/src/styles/css-import-order.css
  • e2e/react-start/dev-ssr-styles/tests/app.spec.ts
  • packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts
  • packages/start-plugin-core/src/vite/dev-server-plugin/plugin.ts
  • packages/start-plugin-core/tests/vite/dev-styles.test.ts
💤 Files with no reviewable changes (1)
  • e2e/react-start/dev-ssr-styles/src/styles/app.css

@@ -0,0 +1,5 @@
.css-import-order {
--css-import-base-marker: issue-7794;
background-color: #ffffff;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the Stylelint error before merging.

Stylelint reports declaration-empty-line-before on Line 3. Add an empty line between the custom property and background-color.

Proposed fix
 .css-import-order {
   --css-import-base-marker: issue-7794;
+
   background-color: `#ffffff`;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
background-color: #ffffff;
.css-import-order {
--css-import-base-marker: issue-7794;
background-color: `#ffffff`;
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 3-3: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/react-start/dev-ssr-styles/src/styles/css-import-base.css` at line 3, In
the stylesheet declaration block, add an empty line between the custom property
and the background-color declaration to satisfy Stylelint’s
declaration-empty-line-before rule.

Source: Linters/SAST tools

Comment on lines +28 to +47
const cssBodies: Array<Promise<string>> = []
page.on('response', (response) => {
if (
new URL(response.url()).pathname.endsWith(
'/@tanstack-start/styles.css',
)
) {
cssBodies.push(response.text())
}
})

await page.goto('/css-import-order')
await expect(page.getByTestId('css-import-order')).toBeVisible()
await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(1)

await page.reload()
await expect(page.getByTestId('css-import-order')).toBeVisible()
await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(2)

const [initialCss, reloadedCss] = await Promise.all(cssBodies.slice(0, 2))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Associate each CSS response with its navigation.

The listener may collect multiple stylesheet responses before reload(), so slice(0, 2) can compare two responses from the first navigation and never validate the reload.

Proposed fix
-      const cssBodies: Array<Promise<string>> = []
-      page.on('response', (response) => {
-        if (
-          new URL(response.url()).pathname.endsWith(
-            '/@tanstack-start/styles.css',
-          )
-        ) {
-          cssBodies.push(response.text())
-        }
-      })
+      const isDevStylesResponse = (response: { url(): string }) =>
+        new URL(response.url()).pathname.endsWith(
+          '/@tanstack-start/styles.css',
+        )
 
+      const initialResponsePromise =
+        page.waitForResponse(isDevStylesResponse)
       await page.goto('/css-import-order')
       await expect(page.getByTestId('css-import-order')).toBeVisible()
-      await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(1)
+      const initialCss = await (await initialResponsePromise).text()
 
+      const reloadedResponsePromise =
+        page.waitForResponse(isDevStylesResponse)
       await page.reload()
       await expect(page.getByTestId('css-import-order')).toBeVisible()
-      await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(2)
-
-      const [initialCss, reloadedCss] = await Promise.all(cssBodies.slice(0, 2))
+      const reloadedCss = await (await reloadedResponsePromise).text()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const cssBodies: Array<Promise<string>> = []
page.on('response', (response) => {
if (
new URL(response.url()).pathname.endsWith(
'/@tanstack-start/styles.css',
)
) {
cssBodies.push(response.text())
}
})
await page.goto('/css-import-order')
await expect(page.getByTestId('css-import-order')).toBeVisible()
await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(1)
await page.reload()
await expect(page.getByTestId('css-import-order')).toBeVisible()
await expect.poll(() => cssBodies.length).toBeGreaterThanOrEqual(2)
const [initialCss, reloadedCss] = await Promise.all(cssBodies.slice(0, 2))
const isDevStylesResponse = (response: { url(): string }) =>
new URL(response.url()).pathname.endsWith(
'/@tanstack-start/styles.css',
)
const initialResponsePromise =
page.waitForResponse(isDevStylesResponse)
await page.goto('/css-import-order')
await expect(page.getByTestId('css-import-order')).toBeVisible()
const initialCss = await (await initialResponsePromise).text()
const reloadedResponsePromise =
page.waitForResponse(isDevStylesResponse)
await page.reload()
await expect(page.getByTestId('css-import-order')).toBeVisible()
const reloadedCss = await (await reloadedResponsePromise).text()
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/react-start/dev-ssr-styles/tests/app.spec.ts` around lines 28 - 47,
Update the CSS response collection in the test around the page response listener
and navigation steps so each navigation records its own stylesheet response.
Capture the response associated with the initial page.goto separately from the
response observed after page.reload, then compare those two navigation-specific
promises instead of taking cssBodies.slice(0, 2).

Comment thread packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts Outdated
@codspeed-hq

codspeed-hq Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by ×3.3

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 2 regressed benchmarks
✅ 175 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation client-route-tree-scale navigation loop (react) 74 ms 77 ms -3.96%
Memory mem server server-fn-churn (react) 271.1 KB 281.9 KB -3.84%
Memory mem server server-fn-churn (vue) 3,985.2 KB 274 KB ×15
Memory mem server server-fn-churn (solid) 3,825.7 KB 268.5 KB ×14
Memory mem server error-paths redirect (vue) 611.4 KB 305.8 KB +99.9%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing fix-7794 (79d9a70) with main (0b178a7)

Open in CodSpeed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@e2e/solid-start/dev-ssr-styles/src/styles/code-split-route.module.css`:
- Around line 2-3: In the stylesheet rule containing
--solid-code-split-style-marker, insert an empty line before the
background-color declaration to satisfy the declaration-empty-line-before
Stylelint rule.

In `@e2e/solid-start/dev-ssr-styles/tsconfig.json`:
- Line 21: Update the compilerOptions.types setting in the dev-ssr-styles
tsconfig to include Node ambient types alongside vite/client, or remove the
explicit types allowlist so tests/setup/global.setup.ts receives the process
type from `@types/node`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 14108bd2-a34a-4920-8377-03211f98c330

📥 Commits

Reviewing files that changed from the base of the PR and between 0f55262 and 79d9a70.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (30)
  • e2e/solid-start/dev-ssr-styles/.gitignore
  • e2e/solid-start/dev-ssr-styles/package.json
  • e2e/solid-start/dev-ssr-styles/playwright.config.ts
  • e2e/solid-start/dev-ssr-styles/src/components/CodeSplitStyledBox.tsx
  • e2e/solid-start/dev-ssr-styles/src/router.tsx
  • e2e/solid-start/dev-ssr-styles/src/routes/__root.tsx
  • e2e/solid-start/dev-ssr-styles/src/routes/index.tsx
  • e2e/solid-start/dev-ssr-styles/src/styles/app.css
  • e2e/solid-start/dev-ssr-styles/src/styles/code-split-route.module.css
  • e2e/solid-start/dev-ssr-styles/tests/app.spec.ts
  • e2e/solid-start/dev-ssr-styles/tests/setup/global.setup.ts
  • e2e/solid-start/dev-ssr-styles/tests/setup/global.teardown.ts
  • e2e/solid-start/dev-ssr-styles/tsconfig.json
  • e2e/solid-start/dev-ssr-styles/vite.config.ts
  • e2e/vue-start/dev-ssr-styles/.gitignore
  • e2e/vue-start/dev-ssr-styles/package.json
  • e2e/vue-start/dev-ssr-styles/playwright.config.ts
  • e2e/vue-start/dev-ssr-styles/src/components/SfcStyledBox.vue
  • e2e/vue-start/dev-ssr-styles/src/router.tsx
  • e2e/vue-start/dev-ssr-styles/src/routes/__root.tsx
  • e2e/vue-start/dev-ssr-styles/src/routes/index.tsx
  • e2e/vue-start/dev-ssr-styles/src/styles/app.css
  • e2e/vue-start/dev-ssr-styles/src/vue-shim.d.ts
  • e2e/vue-start/dev-ssr-styles/tests/app.spec.ts
  • e2e/vue-start/dev-ssr-styles/tests/setup/global.setup.ts
  • e2e/vue-start/dev-ssr-styles/tests/setup/global.teardown.ts
  • e2e/vue-start/dev-ssr-styles/tsconfig.json
  • e2e/vue-start/dev-ssr-styles/vite.config.ts
  • packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts
  • packages/start-plugin-core/tests/vite/dev-styles.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/start-plugin-core/src/vite/dev-server-plugin/dev-styles.ts

Comment on lines +2 to +3
--solid-code-split-style-marker: present;
background-color: #3b82f6;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the Stylelint violation.

Insert an empty line between the custom property and background-color to satisfy declaration-empty-line-before.

Suggested fix
 .styledBox {
   --solid-code-split-style-marker: present;
+
   background-color: `#3b82f6`;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
--solid-code-split-style-marker: present;
background-color: #3b82f6;
--solid-code-split-style-marker: present;
background-color: `#3b82f6`;
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 3-3: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/solid-start/dev-ssr-styles/src/styles/code-split-route.module.css` around
lines 2 - 3, In the stylesheet rule containing --solid-code-split-style-marker,
insert an empty line before the background-color declaration to satisfy the
declaration-empty-line-before Stylelint rule.

Source: Linters/SAST tools

"~/*": ["./src/*"]
},
"noEmit": true,
"types": ["vite/client"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n '"types"|"`@types/node`"|process\.env' \
  e2e/solid-start/dev-ssr-styles/tsconfig.json \
  e2e/solid-start/dev-ssr-styles/package.json \
  e2e/solid-start/dev-ssr-styles/tests/setup/global.setup.ts

Repository: TanStack/router

Length of output: 406


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== tsconfig ==\n'
cat -n e2e/solid-start/dev-ssr-styles/tsconfig.json

printf '\n== package.json ==\n'
cat -n e2e/solid-start/dev-ssr-styles/package.json

printf '\n== setup file ==\n'
cat -n e2e/solid-start/dev-ssr-styles/tests/setup/global.setup.ts

printf '\n== config inheritance search ==\n'
rg -n '"extends"|compilerOptions|types' e2e/solid-start/dev-ssr-styles -g 'tsconfig*.json'

Repository: TanStack/router

Length of output: 2907


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, pathlib
p = pathlib.Path('e2e/solid-start/dev-ssr-styles/tsconfig.json')
data = json.loads(p.read_text())
print('extends:', data.get('extends'))
print('compilerOptions.types:', data.get('compilerOptions', {}).get('types'))
PY

Repository: TanStack/router

Length of output: 206


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Focus on any tsconfig chain that may add node types.
find e2e/solid-start/dev-ssr-styles -name 'tsconfig*.json' -print

Repository: TanStack/router

Length of output: 198


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, pathlib
p = pathlib.Path('e2e/solid-start/dev-ssr-styles/package.json')
data = json.loads(p.read_text())
print('scripts:')
for k,v in data.get('scripts', {}).items():
    print(f'  {k}: {v}')
PY

Repository: TanStack/router

Length of output: 432


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json, pathlib
p = pathlib.Path('e2e/solid-start/dev-ssr-styles/tsconfig.json')
data = json.loads(p.read_text())
print(json.dumps(data, indent=2))
PY

Repository: TanStack/router

Length of output: 771


Include Node ambient types here
e2e/solid-start/dev-ssr-styles/tsconfig.json:21 only allows vite/client, so tests/setup/global.setup.ts won’t get process from @types/node even though it’s used at line 12. Add "node" to compilerOptions.types, or remove the explicit allowlist.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@e2e/solid-start/dev-ssr-styles/tsconfig.json` at line 21, Update the
compilerOptions.types setting in the dev-ssr-styles tsconfig to include Node
ambient types alongside vite/client, or remove the explicit types allowlist so
tests/setup/global.setup.ts receives the process type from `@types/node`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@import CSS seems to be duplicated during development SSR

1 participant