vite-plugins/vite.config.ts

23 lines
570 B
TypeScript

import { readdirSync } from 'node:fs';
import { resolve } from 'node:path';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
export default defineConfig({
build: {
target: 'node20',
lib: {
entry: resolve(__dirname, 'src/index.ts'),
formats: ['es'],
fileName: 'index',
},
rollupOptions: {
external: [
/node:.*/,
'chokidar', 'fast-glob',
'node-html-parser',
],
},
},
plugins: [dts()],
});