-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.js
51 lines (50 loc) · 1.3 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
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.startsWith("sl-"),
},
},
}),
],
build: {
lib: {
entry: "./src/main.js", // Adjust the entry point as needed
name: "ViurShopComponents",
fileName: (format) => `viur-shop-components.${format}.js`,
},
cssCodeSplit: false,
rollupOptions: {
external: [
"vue",
"pinia",
"@viur/shoelace",
"@viur/ignite",
"@viur/vue-utils",
"vue-router",
"@ckeditor/ckeditor5-vue",
"@ckeditor/ckeditor5-build-classic",
"@viur/ckeditor5-build-classic",
],
output: {
assetFileNames: (assetInfo) => {
return assetInfo.name;
},
globals: {
vue: "Vue",
pinia: "Pinia",
"@viur/shoelace": "ViurShoelace",
"@viur/ignite": "ViurIgnite",
"vue-router": "VueRouter",
"@ckeditor/ckeditor5-vue": "CKEditor5Vue",
"@ckeditor/ckeditor5-build-classic": "ClassicEditor",
"@viur/ckeditor5-build-classic": "ViurCkeditor",
"@viur/vue-utils": "ViurVueUtils",
},
},
},
},
});