diff --git a/vite.config.ts b/vite.config.ts index bb7ca1e8..b8318439 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -3,65 +3,61 @@ import vue from "@vitejs/plugin-vue"; import path from "path"; export default defineConfig({ - plugins: [vue()], + plugins: [vue()], - resolve: { - alias: { - "@": path.resolve(__dirname, "./ts"), - }, - }, + resolve: { + alias: { + "@": path.resolve(__dirname, "./ts"), + }, + }, - css: { - preprocessorOptions: { - scss: { - // Only add this if you have a variables file and need it auto-imported - // Comment out or adjust the path if this file doesn't exist or causes issues - // additionalData: `@use "@/style/variables.scss" as *;`, + css: { + preprocessorOptions: { + scss: { + api: "modern-compiler", + silenceDeprecations: ["import", "global-builtin", "if-function"], + }, + }, + }, - api: "modern-compiler", // Use the modern Sass API - silenceDeprecations: ["import", "global-builtin"], - }, - }, - }, + build: { + manifest: true, + outDir: "static/gen", + emptyOutDir: true, + rollupOptions: { + input: { + main: path.resolve(__dirname, "ts/main.ts"), + }, + output: { + entryFileNames: "js/bundle.[hash].js", + chunkFileNames: "js/[name].[hash].js", + assetFileNames: (assetInfo) => { + if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) { + return "fonts/[name].[hash][extname]"; + } + if (/\.css$/.test(assetInfo.name || "")) { + return "css/style.[hash][extname]"; + } + return "assets/[name].[hash][extname]"; + }, + }, + }, + sourcemap: true, + }, - build: { - manifest: true, - outDir: "static/gen", - emptyOutDir: true, - rollupOptions: { - input: { - main: path.resolve(__dirname, "ts/main.ts"), - }, - output: { - entryFileNames: "js/bundle.[hash].js", - chunkFileNames: "js/[name].[hash].js", - assetFileNames: (assetInfo) => { - if (/\.(woff2?|ttf|eot)$/.test(assetInfo.name || "")) { - return "fonts/[name].[hash][extname]"; - } - if (/\.css$/.test(assetInfo.name || "")) { - return "css/style.[hash][extname]"; - } - return "assets/[name].[hash][extname]"; - }, - }, - }, - sourcemap: true, - }, - - server: { - allowedHosts: ["poweredge.local", "dev-sync.nidus.cloud"], - port: 9000, - proxy: { - "/api": { - target: "http://127.0.0.1:9002", - changeOrigin: true, - }, - "/signup": { - target: "http://localhost:9002", - changeOrigin: false, - } - }, - strictPort: true, - }, + server: { + allowedHosts: ["poweredge.local", "dev-sync.nidus.cloud"], + port: 9000, + proxy: { + "/api": { + target: "http://127.0.0.1:9002", + changeOrigin: true, + }, + "/signup": { + target: "http://localhost:9002", + changeOrigin: false, + } + }, + strictPort: true, + }, });