-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
61 lines (59 loc) · 1.79 KB
/
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
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
import Components from 'unplugin-vue-components/vite'
// import path from 'path'
// import dts from 'vite-plugin-dts'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
Icons({
autoInstall: true,
}),
Components({
resolvers: [IconsResolver()],
}),
// dts(),
],
server: {
port: 3000,
},
/** Comment in to create a transpiled version of every component with typings
** that can be imported in javascript only environments
** Since I assume, that every project using vue has a build pipeline that understands vue and typescript files,
** the vue components can be imported direcly
** That way, they get transpiled using the users pipeline targeting their environment
** This is why I publish vue components only
*/
// build: {
// lib: {
// entry: path.resolve('src/index.ts'),
// name: 'FuzzyUI',
// // fileName: (format) => `my-lib.${format}.js`
// formats: ['umd'],
// },
// rollupOptions: {
// // input: entries,
// // make sure to externalize deps that shouldn't be bundled
// // into your library
// external: ['vue'],
// output: {
// // Provide global variables to use in the UMD build
// // for externalized deps
// globals: {
// vue: 'Vue',
// },
// name: 'FuzzyUI',
// // preserveModules: true,
// // entryFileNames: ({ name: fileName }) => {
// // return `${fileName}.js`
// // },
// // preserveModules: true,
// entryFileNames: '[name].js',
// format: 'umd',
// },
// },
// },
})