diff --git a/site/vite.config.ts b/site/vite.config.ts index d5e791ab1..a58901a8e 100644 --- a/site/vite.config.ts +++ b/site/vite.config.ts @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import yaml from '@rollup/plugin-yaml' import legacy from '@vitejs/plugin-legacy' import react from '@vitejs/plugin-react' @@ -127,8 +129,10 @@ function multipleSPA(options: MultipleSPAOptions): Plugin { const filledTemplate = template .toString() .replace(/\{\{(.+)\}\}/g, (_match, p1) => siteData[(p1 as string).trim()]) + return filledTemplate } + return { name: 'multiple-spa', enforce: 'pre', @@ -188,6 +192,7 @@ function multipleSPA(options: MultipleSPAOptions): Plugin { if (pathname?.startsWith('virtual:')) { return pathname.replace('virtual:', '') } + return null },