forked from MelihAltintas/vue3-openlayers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.js
38 lines (35 loc) · 873 Bytes
/
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from "path"
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
preserveSymlinks: false,
dedupe: ['vue'],
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
build: {
lib: {
entry: resolve(__dirname, './src/index.js'),
name: 'vue3-openlayers',
fileName: (format) => `vue3-openlayers.${format}.js`,
},
rollupOptions: {
external: ['vue'],
output: {
inlineDynamicImports : true,
globals: {
vue: 'Vue'
},
assetFileNames: (assetInfo) => {
if (assetInfo.name == 'style.css')
return 'vue3-openlayers.css';
return assetInfo.name;
},
}
}
}
})