Merge branch 'main' into patch-21

This commit is contained in:
Michael Brevard 2024-06-04 12:21:01 +03:00 committed by GitHub
commit afa2e9aedf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 17 additions and 7 deletions

View File

@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
ref: refs/pull/${{ github.event.issue.number }}/merge
ref: ${{ github.event.issue.pull_request.head.sha }}
fetch-depth: 0
- run: corepack enable

6
packages/nuxt/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
src/app/components/error-404.vue
src/app/components/error-500.vue
src/app/components/error-dev.vue
src/app/components/welcome.vue
src/core/runtime/nitro/error-500.ts
src/core/runtime/nitro/error-dev.ts

View File

@ -1 +0,0 @@
../../../../ui-templates/dist/templates/error-404.vue

View File

@ -1 +0,0 @@
../../../../ui-templates/dist/templates/error-500.vue

View File

@ -1 +0,0 @@
../../../../ui-templates/dist/templates/error-dev.vue

View File

@ -1 +0,0 @@
../../../../ui-templates/dist/templates/welcome.vue

View File

@ -1 +0,0 @@
../../../../../ui-templates/dist/templates/error-500.ts

View File

@ -1 +0,0 @@
../../../../../ui-templates/dist/templates/error-dev.ts

View File

@ -1,5 +1,6 @@
import { fileURLToPath } from 'node:url'
import { readFileSync, rmdirSync, unlinkSync, writeFileSync } from 'node:fs'
import { copyFile } from 'node:fs/promises'
import { basename, dirname, join, resolve } from 'pathe'
import type { Plugin } from 'vite'
// @ts-expect-error https://github.com/GoogleChromeLabs/critters/pull/151
@ -167,6 +168,15 @@ export const RenderPlugin = () => {
unlinkSync(fileName)
rmdirSync(dirname(fileName))
}
// we manually copy files across rather than using symbolic links for better windows support
const nuxtRoot = r('../nuxt')
for (const file of ['error-404.vue', 'error-500.vue', 'error-dev.vue', 'welcome.vue']) {
await copyFile(r(`dist/templates/${file}`), join(nuxtRoot, 'src/app/components', file))
}
for (const file of ['error-500.ts', 'error-dev.ts']) {
await copyFile(r(`dist/templates/${file}`), join(nuxtRoot, 'src/core/runtime/nitro', file))
}
},
}
}