vite.config.ts 442 B

12345678910111213141516171819
  1. import { defineConfig } from "vite";
  2. import vue from "@vitejs/plugin-vue";
  3. import { resolve } from "path";
  4. const pathResolve = (dir: string) => {
  5. return resolve(process.cwd(), ".", dir);
  6. };
  7. export default defineConfig({
  8. base: process.env.NODE_ENV === "production" ? "./" : "/",
  9. plugins: [vue()],
  10. resolve: {
  11. alias: [
  12. {
  13. find: "@",
  14. replacement: pathResolve("src"),
  15. },
  16. ],
  17. dedupe: ["vue"],
  18. },
  19. });