30 lines
533 B
TypeScript
30 lines
533 B
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import gql from '@rollup/plugin-graphql';
|
|
import path from 'path';
|
|
|
|
function resolve(dir: string) {
|
|
return path.join(__dirname, dir);
|
|
}
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve('./src'),
|
|
styles: resolve('./src/styles'),
|
|
gql: resolve('./src/graphql/gql'),
|
|
}
|
|
},
|
|
server: {
|
|
port: 8080,
|
|
hmr: {
|
|
clientPort: 8080
|
|
}
|
|
},
|
|
plugins: [
|
|
gql(),
|
|
vue(),
|
|
]
|
|
})
|