vite.config.mts 612 B

1234567891011121314151617181920212223242526272829303132
  1. import path from "node:path";
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import { VitePWA } from 'vite-plugin-pwa'
  5. export default defineConfig({
  6. base: './',
  7. plugins: [
  8. vue({
  9. script: {
  10. defineModel: true
  11. }
  12. }),
  13. VitePWA({
  14. // add this to cache all the imports
  15. workbox: {
  16. globPatterns: ["**/*"],
  17. },
  18. // add this to cache all the
  19. // static assets in the public folder
  20. includeAssets: [
  21. "**/*",
  22. ],
  23. }),
  24. ],
  25. resolve: {
  26. alias: {
  27. "@": path.resolve(__dirname, "./src"),
  28. },
  29. },
  30. })