84 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			84 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
// Node.js built-ins
 | 
						|
import { fileURLToPath, resolve, URL } from 'node:url'
 | 
						|
 | 
						|
// External dependencies and plugins (alphabetical order)
 | 
						|
import Vue from '@vitejs/plugin-vue'
 | 
						|
import Fonts from 'unplugin-fonts/vite'
 | 
						|
import Components from 'unplugin-vue-components/vite'
 | 
						|
import VueRouter from 'unplugin-vue-router/vite'
 | 
						|
import { defineConfig } from 'vite'
 | 
						|
import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
 | 
						|
 | 
						|
// https://vitejs.dev/config/
 | 
						|
export default defineConfig({
 | 
						|
  plugins: [
 | 
						|
    VueRouter({
 | 
						|
      dts: 'src/typed-router.d.ts',
 | 
						|
    }),
 | 
						|
    Vue({
 | 
						|
      template: { transformAssetUrls },
 | 
						|
    }),
 | 
						|
    // https://github.com/vuetifyjs/vuetify-loader/tree/master/packages/vite-plugin#readme
 | 
						|
    Vuetify({
 | 
						|
      autoImport: true,
 | 
						|
      styles: {
 | 
						|
        configFile: 'src/styles/settings.scss',
 | 
						|
      },
 | 
						|
    }),
 | 
						|
    Components({
 | 
						|
      dts: 'src/components.d.ts',
 | 
						|
    }),
 | 
						|
    Fonts({
 | 
						|
      fontsource: {
 | 
						|
        families: [
 | 
						|
          {
 | 
						|
            name: 'Roboto',
 | 
						|
            weights: [100, 300, 400, 500, 700, 900],
 | 
						|
            styles: ['normal', 'italic'],
 | 
						|
          },
 | 
						|
        ],
 | 
						|
      },
 | 
						|
    }),
 | 
						|
  ],
 | 
						|
  optimizeDeps: {
 | 
						|
    exclude: [
 | 
						|
      'vuetify',
 | 
						|
      'vue-router',
 | 
						|
      'unplugin-vue-router/runtime',
 | 
						|
      'unplugin-vue-router/data-loaders',
 | 
						|
      'unplugin-vue-router/data-loaders/basic',
 | 
						|
    ],
 | 
						|
  },
 | 
						|
  define: { 'process.env': {} },
 | 
						|
  resolve: {
 | 
						|
    alias: {
 | 
						|
      '@': fileURLToPath(new URL('src', import.meta.url)),
 | 
						|
      'components': fileURLToPath(new URL('src/components', import.meta.url)),
 | 
						|
      'script': fileURLToPath(new URL('src/script', import.meta.url)),
 | 
						|
      'utils': fileURLToPath(new URL('src/utils', import.meta.url)),
 | 
						|
    },
 | 
						|
    extensions: [
 | 
						|
      '.js',
 | 
						|
      '.json',
 | 
						|
      '.jsx',
 | 
						|
      '.mjs',
 | 
						|
      '.ts',
 | 
						|
      '.tsx',
 | 
						|
      '.vue',
 | 
						|
    ],
 | 
						|
  },
 | 
						|
  server: {
 | 
						|
    port: 3000,
 | 
						|
  },
 | 
						|
  css: {
 | 
						|
    preprocessorOptions: {
 | 
						|
      sass: {
 | 
						|
        api: 'modern-compiler',
 | 
						|
      },
 | 
						|
      scss: {
 | 
						|
        api: 'modern-compiler',
 | 
						|
      },
 | 
						|
    },
 | 
						|
  },
 | 
						|
})
 |