@nguyenshort/vue3-loading-indicator
Version:
Vue 3 Loading Indicator bar. Support typescript, composable API, option API
41 lines (38 loc) • 1.09 kB
text/typescript
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import * as path from 'path'
import typescript from "@rollup/plugin-typescript"
const resolvePath = (str: string) => path.resolve(__dirname, str)
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
build: {
lib: {
entry: path.resolve(__dirname, "src/index.ts"),
name: "Vue3Process",
fileName: (format) => `index.${format}.js`,
},
rollupOptions: {
// 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",
},
},
plugins: [
typescript({
'target': 'es2020',
'rootDir': resolvePath('./src'),
'declaration': true,
'declarationDir': resolvePath('./dist'),
exclude: resolvePath('./node_modules/**'),
allowSyntheticDefaultImports: true
})
]
},
},
})