forked from pieroxy/lz-string
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.mts
54 lines (51 loc) · 1.44 KB
/
vite.config.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
* SPDX-FileCopyrightText: 2013 Pieroxy <[email protected]>
*
* SPDX-License-Identifier: MIT
*/
/// <reference types="vitest" />
import { resolve } from "path";
import { defineConfig } from "vite";
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()],
build: {
minify: true,
reportCompressedSize: true,
sourcemap: true,
lib: {
entry: resolve(__dirname, "src/index.ts"),
fileName: "index",
},
rollupOptions: {
external: ["fs"],
output: [
{
format: "cjs",
name: "LZString",
entryFileNames: "[name].cjs",
},
{
format: "es",
preserveModules: true,
entryFileNames: "[name].js",
},
{
format: "umd",
name: "LZString",
entryFileNames: "[name].[format].js",
},
],
},
},
test: {
coverage: {
include: ["src/**"],
reporter: ["cobertura", "html", "text"],
},
reporters: ["junit", "default"],
outputFile: "junit-reports/TEST-vitest.xml",
},
});