vite.config.js 564 B

12345678910111213141516171819202122232425262728
  1. import { defineConfig } from 'vite';
  2. import { resolve } from 'path';
  3. import vue from '@vitejs/plugin-vue';
  4. export default defineConfig({
  5. base: '/',
  6. // define: {
  7. // 'process.env': process.env, // 啟用環境變數
  8. // },
  9. plugins: [vue()],
  10. resolve: {
  11. dedupe: [
  12. 'vue'
  13. ],
  14. alias: {
  15. '@': resolve(__dirname, 'src'),
  16. }
  17. },
  18. build: {
  19. rollupOptions: {
  20. output: {
  21. entryFileNames: `assets/[name].js`,
  22. chunkFileNames: `assets/[name].js`,
  23. assetFileNames: `assets/[name].[ext]`
  24. }
  25. },
  26. },
  27. })