mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Fix dev server infinite reload
This commit is contained in:
@@ -44,7 +44,7 @@ export default defineConfig({
|
||||
plugins: [
|
||||
FullReload([
|
||||
path.relative(__dirname, '../dist/custom-elements.json'),
|
||||
path.relative(__dirname, './public/**/*.*')
|
||||
// path.relative(__dirname, './public/**/*.*')
|
||||
])
|
||||
]
|
||||
},
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user