vite.config.ts 592 B

1234567891011121314151617181920212223242526272829
  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. export default defineConfig({
  7. plugins: [
  8. optimizer(getReplacer()),
  9. devPlugin(),
  10. vue()
  11. ],
  12. build: {
  13. rollupOptions: {
  14. plugins: [buildPlugin()],
  15. },
  16. },
  17. resolve: {
  18. alias: {
  19. "@": "./src",
  20. },
  21. },
  22. server: {
  23. host: '127.0.0.1',
  24. },
  25. });