-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
62 lines (61 loc) · 1.36 KB
/
vite.config.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
55
56
57
58
59
60
61
62
import { resolve } from 'path'
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
import AutoImport from 'unplugin-auto-import/vite'
// import VueRouter from 'unplugin-vue-router/vite'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, 'src/main.js'),
name: 'Pinboard',
fileName: 'index',
},
rollupOptions: {
external: [ 'vue' ],
output: {
globals: {
vue: 'Vue'
},
exports: 'named',
// entryFileNames: `assets/[name].js`,
// chunkFileNames: `assets/[name].js`,
// assetFileNames: `assets/[name].[ext]`
}
}
},
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler',
},
},
},
plugins: [
// VueRouter(),
vue(),
vueDevTools(),
AutoImport({
imports: [
// 'vue',
// 'vue-router',
{
'pinia': [ 'defineStore', 'storeToRefs', 'acceptHMRUpdate' ],
}
],
// dirs: [
// './src/stores',
// ],
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
optimizeDeps: {
include: [ '@turf/jsts', 'maplibre-gl', 'concaveman' ],
}
})