mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-23 03:27:27 +09:00
Fixes #6440 ## Description Static exports currently omit Text pages such as `/robots.txt`, `/ads.txt`, and `/.well-known/security.txt`. This generates their routes, evaluates content through the existing page-data loader, and uses Vike's native `pageContext.content` to write the exact text at the configured file path. Internal route directories are separate from public URLs so dot-prefixed paths work. No generated writer script, text-page manifest, HTML wrapper, or post-build file rewrite is needed. ## Dependencies - Pin Vike to `0.4.267-commit-feffb0f`: native non-HTML output is published in this commit prerelease but is not yet in stable `0.4.267`. - Use Vite `7.1.12` and the compatible React plugin for SSG. Build through `vike build && vike prerender` so Vike uses its matching Vite dependency. - Update React Router's `vite-node` dependency to `3.2.4` for compatibility with the CLI's Vite 7 test environment. ## Validation - All 1,173 CLI tests pass locally across 72 files, including all 79 prebuild tests for normal HTML, dynamic SSG routes, and React Router builds. - Text export coverage checks exact output for `/robots.txt`, resource-backed `/.well-known/security.txt`, empty text, Unicode, and HTML-like content. - CLI and SSG fixture type checks, lint, and formatting pass locally. - SSG fixtures regenerated; the packaged SSG test passes locally. - All executed GitHub CI checks pass at `201fa971616bb607ca35ee24a970f107eddee754`, including all six browser shards. Shard 4 passed on retry after an MDX template rename timeout. Visual regression is skipped and preview deployment remains gated. - Corrected the existing animation navigation test for fork CI: wait for the rendered component with the public fallback and retain the animation initialization assertion when the private module is present. ## Manual verification 1. Export a static project with Text pages at `/robots.txt` and `/.well-known/security.txt`. 2. Run the generated project's build. 3. Confirm both files under `dist/client` contain exactly the configured text, including resource expressions. 4. Confirm normal pages still render HTML. - [ ] Original author tested the updated export and confirmed it works. - [ ] Preview tested (deployment approval remains gated). --------- Co-authored-by: Sviat Barbutsa <9897782+sviat-barbutsa@users.noreply.github.com> Co-authored-by: Oleg Isonen <oleg008@gmail.com>
58 lines
1.9 KiB
JSON
58 lines
1.9 KiB
JSON
{
|
|
"name": "ssg-netlify-by-project-id",
|
|
"version": "1.0.0",
|
|
"description": "",
|
|
"scripts": {
|
|
"build": "vike build && vike prerender",
|
|
"build:debug": "pnpm build && cd dist && oxfmt '**/*.html'",
|
|
"dev": "vite dev",
|
|
"typecheck": "tsc --noEmit",
|
|
"cli": "NODE_OPTIONS='--conditions=webstudio --import=tsx' webstudio",
|
|
"cli:local": "node ../../packages/cli/local.js",
|
|
"fixtures:link": "pnpm cli:local link --link https://p-8a7358b1-7de3-459d-b7b1-56dddfb6ce1e-dot-${BUILDER_HOST:-main.development.webstudio.is}'?authToken=f55154e6-36b9-4920-bc81-3095cc88f8ff'",
|
|
"fixtures:sync": "pnpm cli:local sync && oxfmt ./.webstudio/",
|
|
"fixtures:build": "rm -rf pages && pnpm cli:local build --template ssg-netlify --template internal && oxfmt .",
|
|
"start": "vite preview"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.12.0"
|
|
},
|
|
"type": "module",
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"private": true,
|
|
"sideEffects": false,
|
|
"devDependencies": {
|
|
"@types/react": "^18.2.70",
|
|
"@types/react-dom": "^18.2.25",
|
|
"@vitejs/plugin-react": "^4.7.0",
|
|
"typescript": "7.0.2",
|
|
"vite": "7.1.12",
|
|
"webstudio": "workspace:*"
|
|
},
|
|
"dependencies": {
|
|
"@webstudio-is/image": "workspace:*",
|
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
"@webstudio-is/sdk": "workspace:*",
|
|
"@webstudio-is/sdk-components-animation": "workspace:*",
|
|
"@webstudio-is/sdk-components-react": "workspace:*",
|
|
"@webstudio-is/sdk-components-react-radix": "workspace:*",
|
|
"@webstudio-is/sdk-components-react-remix": "workspace:*",
|
|
"react": "18.3.0-canary-14898b6a9-20240318",
|
|
"react-dom": "18.3.0-canary-14898b6a9-20240318",
|
|
"vike": "0.4.267-commit-feffb0f",
|
|
"@webstudio-is/wsauth": "workspace:*",
|
|
"@shikijs/langs": "4.4.1",
|
|
"@shikijs/themes": "4.4.1",
|
|
"shiki": "4.4.1"
|
|
},
|
|
"devEngines": {
|
|
"runtime": {
|
|
"name": "node",
|
|
"version": ">=22.12.0",
|
|
"onFail": "error"
|
|
}
|
|
}
|
|
}
|