omi/components/card/vite.config.ts

28 lines
582 B
TypeScript
Raw Normal View History

2021-08-07 15:18:38 +08:00
import { resolve } from 'path'
import { defineConfig } from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
build: {
lib: {
entry: resolve(__dirname, 'src/index.tsx'),
name: 'index',
formats: ['es'],
fileName: (format) => `index.${format}.js`
},
rollupOptions: {
external: /^omi/,
rollupOptions: {
input: {
main: resolve(__dirname, "index.html"),
admin: resolve(__dirname, "demo.html")
}
}
}
},
esbuild: {
jsxFactory: 'h',
jsxFragment: 'Fragment'
}
})