2022-05-19 18:21:26 +08:00
|
|
|
import { resolve as _resolve } from 'path'
|
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
|
|
|
|
const resolve = (p: string) => _resolve(__dirname, p)
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
compiler: resolve('src/compiler'),
|
|
|
|
core: resolve('src/core'),
|
2022-05-31 15:32:44 +08:00
|
|
|
server: resolve('packages/server-renderer/src'),
|
2022-06-01 22:15:27 +08:00
|
|
|
sfc: resolve('packages/compiler-sfc/src'),
|
2022-05-19 18:21:26 +08:00
|
|
|
shared: resolve('src/shared'),
|
|
|
|
web: resolve('src/platforms/web'),
|
2022-05-27 17:27:17 +08:00
|
|
|
v3: resolve('src/v3'),
|
2022-06-20 15:46:57 +08:00
|
|
|
vue: resolve('src/platforms/web/entry-runtime-with-compiler'),
|
|
|
|
types: resolve('src/types')
|
2022-05-19 18:21:26 +08:00
|
|
|
}
|
|
|
|
},
|
2022-05-24 08:55:11 +08:00
|
|
|
define: {
|
2022-06-15 10:07:42 +08:00
|
|
|
__DEV__: true,
|
|
|
|
__TEST__: true
|
2022-05-24 08:55:11 +08:00
|
|
|
},
|
2022-05-19 18:21:26 +08:00
|
|
|
test: {
|
|
|
|
globals: true,
|
|
|
|
environment: 'jsdom',
|
|
|
|
setupFiles: resolve('test/vitest.setup.ts')
|
|
|
|
}
|
|
|
|
})
|