Skip to content

Commit

Permalink
set base dir
Browse files Browse the repository at this point in the history
  • Loading branch information
arobsn committed Jan 29, 2024
1 parent 6a253e3 commit ab0d3a2
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,31 @@ import { defineConfig } from "vite";
import svgLoader from "vite-svg-loader";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), svgLoader()],
base: "./",
resolve: {
alias: {
"@": path.resolve(__dirname, "./src")

export default defineConfig(({ mode }) => {
return {
plugins: [vue(), svgLoader()],
base: mode === "production" ? "ergsnap/" : "./",
resolve: {
alias: {
"@": path.resolve(__dirname, "./src")
}
},
server: {
port: 8000
}
},
server: {
port: 8000
}
};
});

// export default defineConfig({
// plugins: [vue(), svgLoader()],
// base: import.meta.env.PROD ? "./" : "",
// resolve: {
// alias: {
// "@": path.resolve(__dirname, "./src")
// }
// },
// server: {
// port: 8000
// }
// });

0 comments on commit ab0d3a2

Please sign in to comment.