- Remove noautoinject Wails scripts from config.html (Vite 6 requires type="module" on all script tags; Wails auto-injects them anyway). - Replace vite-tsconfig-paths plugin with Vite native resolve.alias, fixing path alias resolution that was silently broken during builds. - Remove unused vite-tsconfig-paths dependency.
31 lines
875 B
TypeScript
31 lines
875 B
TypeScript
import path from "path";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
"@go": path.resolve(__dirname, "wailsjs/go"),
|
|
"@components": path.resolve(__dirname, "src/components"),
|
|
"@assets": path.resolve(__dirname, "src/assets"),
|
|
"@pages": path.resolve(__dirname, "src/pages"),
|
|
"@runtime": path.resolve(__dirname, "wailsjs/runtime"),
|
|
"@utils": path.resolve(__dirname, "src/utils"),
|
|
"@store": path.resolve(__dirname, "src/store"),
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
main: "index.html",
|
|
config: "src/pages/config/config.html",
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
hmr: {
|
|
host: 'localhost',
|
|
protocol: 'ws',
|
|
},
|
|
},
|
|
});
|