Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prerender): allow disabling html sub-folders #1676

Merged
merged 7 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fix: disable by default for vercel/cloudflare pages
  • Loading branch information
danielroe committed Aug 30, 2023
commit 60c3d5f1b7a2d5f75e19fda7c5bd5e7d81571037
3 changes: 3 additions & 0 deletions src/presets/cloudflare-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export const cloudflarePages = defineNitroPreset({
publicDir: "{{ output.dir }}",
serverDir: "{{ output.dir }}",
},
experimental: {
prerenderIndexHTML: false,
},
alias: {
// Hotfix: Cloudflare appends /index.html if mime is not found and things like ico are not in standard lite.js!
// https://github.com/unjs/nitro/pull/933
Expand Down
9 changes: 9 additions & 0 deletions src/presets/vercel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const vercel = defineNitroPreset({
deploy: "",
preview: "",
},
experimental: {
prerenderIndexHTML: false,
},
hooks: {
"rollup:before": (nitro: Nitro) => {
deprecateSWR(nitro);
Expand Down Expand Up @@ -102,6 +105,9 @@ export const vercelEdge = defineNitroPreset({
process: undefined,
},
},
experimental: {
prerenderIndexHTML: false,
},
hooks: {
"rollup:before": (nitro: Nitro) => {
deprecateSWR(nitro);
Expand Down Expand Up @@ -137,6 +143,9 @@ export const vercelStatic = defineNitroPreset({
commands: {
preview: "npx serve ./static",
},
experimental: {
prerenderIndexHTML: false,
},
hooks: {
"rollup:before": (nitro: Nitro) => {
deprecateSWR(nitro);
Expand Down
Loading