-
Notifications
You must be signed in to change notification settings - Fork 104
/
vite.config.mjs
37 lines (34 loc) · 989 Bytes
/
vite.config.mjs
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
import fsp from "node:fs/promises";
import { defineConfig } from "vite";
import marko from "@marko/vite";
const isCI = !!process.env.CI;
const markdownMatch = /\.md$/;
const rawMarkdown = {
name: "markdown-loader",
async load(id) {
if (markdownMatch.test(id)) {
// raw query, read file and return as string
return `export default ${JSON.stringify(
await fsp.readFile(id, "utf-8"),
)}`;
}
},
};
export default defineConfig({
test: {
pool: "forks",
globals: true,
coverage: {
enabled: isCI,
provider: "istanbul",
reporter: ["json-summary", "html", "cobertura", "lcov"],
include: ["src/**/*"],
exclude: [
"src/**/examples",
"src/components/ebay-icon/icons/",
"src/**/*.stories.ts",
],
},
},
plugins: [marko({ linked: false }), rawMarkdown],
});