enhance: Vite HMR while yarn dev, and more build tuning (#9361)

* enhance: Vite HMR while yarn dev, and more build tuning

* use localhost

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
tamaina
2022-12-20 13:05:36 +09:00
committed by GitHub
parent b4b9d5d552
commit 2fe86fd869
15 changed files with 102 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
block vars
block loadClientEntry
- const clientEntry = getClientEntry();
- const clientEntry = config.clientEntry;
doctype html
@@ -35,11 +35,14 @@ html
link(rel='prefetch' href='https://xn--931a.moe/assets/not-found.jpg')
link(rel='prefetch' href='https://xn--931a.moe/assets/error.jpg')
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.css')
link(rel='modulepreload' href=`/assets/${clientEntry.file}`)
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
if !config.clientManifestExists
script(type="module" src="/vite/@vite/client")
if Array.isArray(clientEntry.css)
each href in clientEntry.css
link(rel='stylesheet' href=`/assets/${href}`)
link(rel='stylesheet' href=`/vite/${href}`)
title
block title