From c0803c57089da5fea820831325252e08d850fca8 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 4 Nov 2023 13:48:59 +0800 Subject: refactor: rebuild with `vuetify` --- vite.config.ts | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 vite.config.ts (limited to 'vite.config.ts') diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 0000000..3a9e7a5 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,50 @@ +// Plugins +import vue from '@vitejs/plugin-vue' +import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify' +import ViteFonts from 'unplugin-fonts/vite' + +// Utilities +import { defineConfig } from 'vite' +import { fileURLToPath, URL } from 'node:url' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + vue({ + template: { transformAssetUrls } + }), + // https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin + vuetify({ + autoImport: true, + styles: { + configFile: 'src/styles/settings.scss', + }, + }), + ViteFonts({ + google: { + families: [{ + name: 'Roboto', + styles: 'wght@100;300;400;500;700;900', + }], + }, + }), + ], + define: { 'process.env': {} }, + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + }, + extensions: [ + '.js', + '.json', + '.jsx', + '.mjs', + '.ts', + '.tsx', + '.vue', + ], + }, + server: { + port: 3000, + }, +}) -- cgit v1.2.3-70-g09d2