vite.config.ts 682 B

12345678910111213141516171819202122232425262728293031
  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. host: '127.0.0.1',
  26. },
  27. });