@ithinkdt/cloud
Version:
iThinkDT Cloud
27 lines (22 loc) • 564 B
text/typescript
import { defineConfig } from 'vite'
import jsx from '@vitejs/plugin-vue-jsx'
import pkg from './package.json'
const external = {
...pkg.peerDependencies,
...pkg.dependencies,
}
export default defineConfig({
build: {
target: 'esnext',
lib: {
entry: './src/index.js',
formats: ['es'],
fileName: 'index',
},
sourcemap: true,
rollupOptions: {
external: Object.keys(external).flatMap((it) => [it, new RegExp(`^${it}/`)]),
},
},
plugins: [jsx()],
})