From a479f702c9e02edae0aa600e625cd895d2b4a9b8 Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Wed, 15 May 2024 14:19:35 -0300 Subject: [PATCH] normalize paths for vite --- generators/vue/templates/vite.config.mts.ejs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generators/vue/templates/vite.config.mts.ejs b/generators/vue/templates/vite.config.mts.ejs index ea528abc20f0..1cbb57c79cc3 100644 --- a/generators/vue/templates/vite.config.mts.ejs +++ b/generators/vue/templates/vite.config.mts.ejs @@ -18,6 +18,7 @@ -%> import { fileURLToPath, URL } from 'node:url'; import { existsSync } from 'node:fs'; +import { normalizePath } from 'vite' import { <%_ if (microfrontend) { _%> @@ -49,10 +50,10 @@ let config = defineConfig({ targets: [ { src: [ - `${swaggerUiPath}/*.{js,css,html,png}`, - `!${swaggerUiPath}/**/index.html`, - getFileFromRepo('axios/dist/axios.min.js'), - fileURLToPath(new URL('./<%- this.relativeDir(clientRootDir, clientSrcDir) %>swagger-ui/index.html', import.meta.url)), + `${normalizePath(swaggerUiPath)}/*.{js,css,html,png}`, + `!${normalizePath(swaggerUiPath)}/**/index.html`, + normalizePath(getFileFromRepo('axios/dist/axios.min.js')), + normalizePath(fileURLToPath(new URL('./<%- this.relativeDir(clientRootDir, clientSrcDir) %>swagger-ui/index.html', import.meta.url))), ], dest: 'swagger-ui', },