Skip to content

Commit 11e4377

Browse files
committed
add vite config
1 parent 93840db commit 11e4377

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/packages/webhook/vite.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { defineConfig } from 'vite';
2+
import { rmSync } from 'fs';
3+
4+
const dist = '../../../dist-cms/packages/webhook';
5+
6+
// delete the unbundled dist folder
7+
rmSync(dist, { recursive: true, force: true });
8+
9+
export default defineConfig({
10+
build: {
11+
target: 'es2022',
12+
lib: {
13+
entry: ['index.ts', 'manifests.ts', 'umbraco-package.ts'],
14+
formats: ['es'],
15+
},
16+
outDir: dist,
17+
sourcemap: true,
18+
rollupOptions: {
19+
external: [/^@umbraco/],
20+
},
21+
},
22+
});

0 commit comments

Comments
 (0)