mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
* Add ESLint config * Add ESLint packages * Add prettier config * Fix ESLint package version * Format all files * Format static assets * Format project root config * Add pre-commit code formatting Formats .css & .js files automatically. If any .ts or .mts files are staged, the entire project is type-checked. Packages: - lint-staged - husky - prettier
38 lines
794 B
TypeScript
38 lines
794 B
TypeScript
/// <reference types='vitest' />
|
|
import { defineConfig } from "vite"
|
|
import path from "path"
|
|
import dts from "vite-plugin-dts"
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, "src/litegraph"),
|
|
name: "litegraph.js",
|
|
fileName: format => `litegraph.${format}.js`,
|
|
formats: ["es", "umd"],
|
|
},
|
|
sourcemap: true,
|
|
target: ["es2022"],
|
|
},
|
|
esbuild: {
|
|
minifyIdentifiers: false,
|
|
minifySyntax: false,
|
|
},
|
|
plugins: [
|
|
dts({
|
|
entryRoot: "src",
|
|
insertTypesEntry: true,
|
|
include: ["src/**/*.ts"],
|
|
outDir: "dist",
|
|
aliasesExclude: ["@"],
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: { "@": "/src" },
|
|
},
|
|
test: {
|
|
alias: { "@/": path.resolve(__dirname, "./src/") },
|
|
environment: "jsdom",
|
|
},
|
|
})
|