generated from okikio/spring-easing
/
vite.config.ts
39 lines (38 loc) · 914 Bytes
/
vite.config.ts
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
/// <reference types="vitest" />
// Configure Vitest (https://vitest.dev/config)
import { defineConfig } from "vite";
import { umd as name } from "./package.json";
import dts from 'vite-plugin-dts';
export default defineConfig({
plugins: [
dts()
],
build: {
outDir: "lib",
minify: false,
sourcemap: true,
rollupOptions: {
external: ["postcss", "postcss-value-parser", "spring-easing"],
output: { exports: "named" },
},
lib: {
entry: "src/index.ts",
name,
formats: ["es", "cjs", "umd"],
fileName(format) {
switch (format) {
case "es":
return "index.mjs";
case "cjs":
return "index.cjs";
default:
return "index.js";
}
}
},
},
test: {
/* for example, use global to avoid globals imports (describe, test, expect): */
// globals: true,
}
});