-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
29 lines (28 loc) · 976 Bytes
/
vite.config.ts
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
import { defineConfig } from "vite";
import { fileURLToPath, URL } from "url";
import path from "path";
import vuePlugin from "@vitejs/plugin-vue";
module.exports = defineConfig({
plugins: [vuePlugin()],
resolve: {
alias: { // must also add to tsconfig.app.json to get VSCode to understand the aliases
'@': fileURLToPath(new URL("./src", import.meta.url)),
'vue-fields-ms': fileURLToPath(new URL("./src/main.ts", import.meta.url)),
'ckeditor': fileURLToPath(new URL("./ckeditor5/ckeditor.js", import.meta.url)),
'@scss': fileURLToPath(new URL("./scss", import.meta.url)),
},
},
build: {
lib: {
entry: path.resolve(__dirname, 'src/main.ts'),
formats: ['es'],
name: 'VueFieldsMs',
fileName: (format) => `vue-fields-ms.${format}.js`
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['vue', 'date-format-ms'],
}
}
});