Fix dev server infinite reload

This commit is contained in:
konnorrogers
2024-03-12 14:16:11 -04:00
parent 5feee64425
commit b1530d0773
4 changed files with 14 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ export default defineConfig({
plugins: [
FullReload([
path.relative(__dirname, '../dist/custom-elements.json'),
path.relative(__dirname, './public/**/*.*')
// path.relative(__dirname, './public/**/*.*')
])
]
},

View File

@@ -42,10 +42,17 @@ export async function generateSearch() {
return json;
}
export async function GET() {
let json: Record<string, unknown> = {};
if (process.env.DEV_SEARCH !== 'generated') {
await generateSearch();
return new Response(JSON.stringify({}), {
// If you're debugging search, comment the next line.
process.env.DEV_SEARCH = 'generated';
}
export async function GET() {
return new Response(JSON.stringify(json), {
status: 200,
headers: {
'Content-Type': 'application/json'

View File

@@ -22,6 +22,10 @@
--docs-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 24%);
}
html {
scrollbar-gutter: stable;
}
/* Utils */
html.wa-theme-dark .only-light,
html:not(.wa-theme-dark) .only-dark {