vite.config.ts 697 B

1234567891011121314151617181920212223242526272829303132
  1. import { defineConfig } from "vite";
  2. import vue from "@vitejs/plugin-vue";
  3. import optimizer from "vite-plugin-optimizer";
  4. import {buildPlugin} from "./plugins/buildPlugin";
  5. import { devPlugin, getReplacer } from "./plugins/devPlugin";
  6. import {svgLoader} from "./plugins/SVGLoader";
  7. export default defineConfig({
  8. plugins: [
  9. optimizer(getReplacer()),
  10. devPlugin(),
  11. vue(),
  12. svgLoader('./src/assets/svg/'),
  13. ],
  14. build: {
  15. rollupOptions: {
  16. plugins: [buildPlugin()],
  17. },
  18. },
  19. resolve: {
  20. alias: {
  21. "@": "/src",
  22. },
  23. },
  24. server: {
  25. hmr:true,
  26. host: '0.0.0.0',
  27. },
  28. });