diff --git a/index.html b/index.html index 88478614..a671f51e 100644 --- a/index.html +++ b/index.html @@ -1,41 +1,50 @@ - - - - - - PageSpy - - - <% if (isDoc) { %> + + + + + PageSpy + + + <% if (isDoc) { %> - + - <% } %> - - - - - - - -
- - + <% } %> + + + + + + +
+ + diff --git a/vite.config.mjs b/vite.config.mjs index aecb0275..bddd6e3c 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -8,9 +8,10 @@ import { ViteEjsPlugin } from 'vite-plugin-ejs'; export default ({ mode, command }) => { const isDoc = mode === 'doc'; const isProd = command === 'build'; + const base = isDoc ? '/page-spy-web/' : '/'; return defineConfig({ - base: isDoc ? '/page-spy-web/' : '/', + base, build: { target: ['chrome100'], sourcemap: isProd ? 'hidden' : true, @@ -37,6 +38,7 @@ export default ({ mode, command }) => { react(), svgr(), ViteEjsPlugin({ + base, isDoc, }), ],