vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { defineConfig } from 'vite';
import solidPlugin from 'vite-plugin-solid';
import { dirname, resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
const scriptDirectory = dirname(fileURLToPath(import.meta.url));
export default defineConfig({
plugins: [solidPlugin()],
build: {
lib: {
entry: resolve(scriptDirectory, 'src/index.tsx'),
name: 'hive',
fileName: 'hive',
},
target: 'esnext',
},
});