0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00
penpot/frontend/text-editor/vite.config.js
2024-11-22 11:06:16 +01:00

43 lines
901 B
JavaScript

import { resolve } from "node:path";
import { defineConfig } from "vite";
import { coverageConfigDefaults } from "vitest/config"
export default defineConfig({
root: "./src",
resolve: {
alias: {
"~": resolve("./src"),
},
},
build: {
minify: true,
sourcemap: true,
lib: {
entry: "src/editor/TextEditor.js",
name: "TextEditor",
fileName: "TextEditor",
formats: ["es"],
},
},
test: {
coverage: {
enabled: true,
exclude: ["main.js", "**/scripts/**", ...coverageConfigDefaults.exclude],
},
poolOptions: {
threads: {
singleThread: true,
},
},
environmentOptions: {
jsdom: {
resources: "usable",
},
},
browser: {
name: "chromium",
provider: "playwright",
},
exclude: ["main.js", "**/scripts/**", "**/node_modules/**", "**/dist/**"],
},
});