Figuring out vite building (no vite building)

This commit is contained in:
marleyrae 2023-06-10 14:49:15 -07:00
parent 46b3bd1d85
commit 7775f3016d
4 changed files with 34 additions and 35 deletions

11
menu.js
View file

@ -1,13 +1,13 @@
/* -------------------------------------------------------------------------------------- find and import config ---- */
const siteRoot = '/' + location.pathname.split('/')[1]
const {wayback} = await import(/* @vite-ignore */`${siteRoot}/config.js`)
/* --------------------------------------------------------------------------------------------- import menu css ---- */
import '/style/menu.css'
/* -------------------------------------------------------------------------------------------------- build menu ---- */
(async () => {
const siteRoot = '/' + location.pathname.split('/')[1]
const {wayback} = await import(/* @vite-ignore */`${siteRoot}/config.js`)
let menu = document.createElement('div')
menu.id = 'archive-menu'
@ -37,3 +37,4 @@ if (wayback) {
}
document.body.prepend(menu)
})()

View file

@ -4,8 +4,6 @@
"vite": "^4.3.9"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"dev": "vite"
}
}

View file

@ -9,8 +9,8 @@ export default defineConfig({
build: {
rollupOptions: {
input: Object.fromEntries(
globSync('**/index.html').map(file => [
relative('saudade', file.slice(0, file.length - extname(file).length)),
globSync('!(dist)/**/*.html').map(file => [
relative('saudade', file.slice(0, file.length - extname(file).length)).slice(3),
resolve(__dirname, file),
]),
),

View file

@ -167,7 +167,7 @@
<a href="breeds/c_wildz.html" title="Wildz (Catz)">Wildz (Catz)</a><br>
<a href="breeds/c_fantasyz.html" title="Fantasyz (Catz)">Fantasyz (Catz)</a><br>
<a href="breeds/forestfolk.html" title="Forest Folk">Forest Folk</a><br>
<a href="breeds/catzdogz.html" title="Catz Dogz">Catz << >> Dogz</a><br>
<a href="breeds/catzdogz.html" title="Catz Dogz">Catz &lt;&lt; &gt;&gt; Dogz</a><br>
<a href="breeds/caninez.html" title="Caninez">Caninez</a><br>
<a href="breeds/d_wildz.html" title="Wildz (Dogz)">Wildz (Dogz)</a><br>
<a href="breeds/d_fantasyz.html" title="Fantasyz (Dogz)">Fantasyz (Dogz)</a><br>