forked from fastify/pacchetto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mjs
52 lines (50 loc) · 1.2 KB
/
vite.config.mjs
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
import viteVue from '@vitejs/plugin-vue'
import viteVueJsx from '@vitejs/plugin-vue-jsx'
import viteBlueprint from 'vite-plugin-blueprint'
import fastifyViteVue from 'fastify-vite-vue'
const dev = process.env.NODE_ENV !== 'production'
export default {
logLevel: dev ? 'error' : 'info',
base: '/pacchetto/',
plugins: [
viteVue(),
viteVueJsx(),
viteBlueprint({
prefix: '@app/',
root: resolve => resolve(fastifyViteVue.path, 'base'),
files: [
['entry/client.js', [
'entry-client.js',
'client/entry.js',
'client-entry.js',
]],
['entry/server.js', [
'entry-server.js',
'server/entry.js',
'server-entry.js',
]],
['client.js'],
['client.vue'],
['head.js'],
['error.vue'],
['router.vue'],
['routes.js'],
['index.css'],
],
}),
],
// Base build settings, default values
// for assetsDir and outDir match Vite's defaults
build: {
assetsDir: 'assets',
outDir: 'dist',
minify: !dev,
},
ssr: {
external: [
'fastify-vite-vue/routing',
'fastify-vite-vue/app',
'fastify-vite-vue/server'
]
}
}