add path aliasing

This commit is contained in:
joshuaboud 2022-08-23 18:19:20 -03:00
parent 5eb523bdf2
commit 4dfc7ce732
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
2 changed files with 13 additions and 2 deletions

View File

@ -17,7 +17,12 @@
"skipLibCheck": true,
"types": [
"vitest/globals",
]
],
"allowJs": true,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"include": [
"src/**/*.ts",

View File

@ -1,15 +1,21 @@
/// <reference types="vitest/config" />
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
base: "./",
resolve: {
alias: {
'@': path.resolve(__dirname, './src')
},
},
build: {
target: [
"chrome87", "edge88", "firefox78", "safari14"
]
],
},
test: {
globals: true,