-
Notifications
You must be signed in to change notification settings - Fork 570
/
vite.config.cli.mts
35 lines (33 loc) · 937 Bytes
/
vite.config.cli.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* SPDX-FileCopyrightText: 2013 Pieroxy <[email protected]>
*
* SPDX-License-Identifier: MIT
*/
import { defineConfig } from "vite";
import bin from "vite-plugin-bin";
import dts from "vite-plugin-dts";
import eslint from "vite-plugin-eslint";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [tsconfigPaths(), dts({ rollupTypes: true }), eslint(), bin()],
build: {
minify: true,
reportCompressedSize: true,
sourcemap: true,
lib: {
entry: "src/cli.ts",
fileName: "cli",
},
outDir: "bin",
rollupOptions: {
external: ["child_process", "events", "fs", "path", "process"],
output: [
{
format: "cjs",
name: "LZString",
entryFileNames: "[name].cjs",
},
],
},
},
});