浏览代码

fix(dashboard): Only transform base path in build phase

Michael Bromley 7 月之前
父节点
当前提交
3a031b3813
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/dashboard/vite/vite-plugin-transform-index.ts

+ 2 - 0
packages/dashboard/vite/vite-plugin-transform-index.ts

@@ -17,6 +17,8 @@ export function transformIndexHtmlPlugin(): Plugin {
             // store the resolved config
             // store the resolved config
             config = resolvedConfig;
             config = resolvedConfig;
         },
         },
+        // Only apply this plugin during the build phase
+        apply: 'build',
         transformIndexHtml(html) {
         transformIndexHtml(html) {
             if (config.base && config.base !== '/') {
             if (config.base && config.base !== '/') {
                 // Remove the base path from hrefs and srcs
                 // Remove the base path from hrefs and srcs