|
|
@ -1,17 +1,26 @@
|
|
|
|
import { dirname, resolve } from 'path'
|
|
|
|
import { dirname, resolve } from 'path'
|
|
|
|
import { fileURLToPath } from 'url'
|
|
|
|
import { fileURLToPath } from 'url'
|
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
|
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
|
|
|
|
|
|
|
|
const dir = dirname(fileURLToPath(import.meta.url))
|
|
|
|
const dir = dirname(fileURLToPath(import.meta.url))
|
|
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
export default defineConfig({
|
|
|
|
|
|
|
|
plugins: [vue()],
|
|
|
|
resolve: {
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
alias: [
|
|
|
|
'@siteData': resolve(dir, './shims.ts'),
|
|
|
|
{ find: '@siteData', replacement: resolve(dir, './shims.ts') },
|
|
|
|
client: resolve(dir, '../../src/client'),
|
|
|
|
{ find: 'client', replacement: resolve(dir, '../../src/client') },
|
|
|
|
node: resolve(dir, '../../src/node'),
|
|
|
|
{ find: 'node', replacement: resolve(dir, '../../src/node') },
|
|
|
|
vitepress: resolve(dir, '../../src/client')
|
|
|
|
{
|
|
|
|
}
|
|
|
|
find: /^vitepress$/,
|
|
|
|
|
|
|
|
replacement: resolve(dir, '../../src/client/index.js')
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
find: /^vitepress\/theme$/,
|
|
|
|
|
|
|
|
replacement: resolve(dir, '../../src/client/theme-default/index.js')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
test: {
|
|
|
|
test: {
|
|
|
|
globals: true
|
|
|
|
globals: true
|
|
|
|