forked from TheJaredWilcurt/vue-doxen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.docs.js
54 lines (51 loc) · 1.56 KB
/
vite.config.docs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* eslint-disable import/no-unused-modules */
import { resolve } from 'node:path';
import { fileURLToPath, URL } from 'node:url';
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vite';
const __dirname = import.meta.dirname;
export default defineConfig({
base: '/vue-doxen',
build: {
chunkSizeWarningLimit: 571.72,
outDir: resolve(__dirname, 'docs'),
rollupOptions: {
external: [
'/vue-doxen/branding/vue-doxen-dog.png',
'/vue-doxen/branding/vue-doxen-logo-large.png',
'/vue-doxen/branding/vue-doxen-text.png'
],
input: resolve(__dirname, 'index.html'),
output: {
manualChunks: {
'@highlightjs/vue-plugin': ['@highlightjs/vue-plugin'],
'axe-core': ['axe-core'],
json5: ['json5'],
'lodash.clonedeep': ['lodash.clonedeep'],
'lodash.isequal': ['lodash.isequal'],
'lodash.lowerfirst': ['lodash.lowerfirst'],
'lodash.startcase': ['lodash.startcase'],
nprogress: ['nprogress'],
'vue-axe': ['vue-axe'],
'vue-options-api-constants-plugin': ['vue-options-api-constants-plugin'],
'vue-router': ['vue-router'],
vue: ['vue']
}
}
}
},
optimizeDeps: {
include: ['axe-core']
},
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./lib', import.meta.url)),
'@@': fileURLToPath(new URL('./tests', import.meta.url)),
'@@@': fileURLToPath(new URL('./app', import.meta.url))
}
},
server: {
open: '/index.html'
}
});