Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
import { defineConfig } from "vite";
import dts from "vite-plugin-dts";
export default defineConfig({
root: __dirname,
cacheDir: "../../../node_modules/.vite/packages/testing-dom",
plugins: [
dts({
entryRoot: "src",
tsconfigPath: "./tsconfig.lib.json",
insertTypesEntry: true,
}),
],
build: {
outDir: "./dist",
emptyOutDir: true,
reportCompressedSize: true,
sourcemap: true,
lib: {
// Multi-entry so every subpath export in package.json#exports
// maps to a real emitted file. Modules not imported from the
// root barrel (polyfills, matchers, config, runner variants)
// are listed explicitly so Rollup keeps them.
entry: {
index: "src/index.ts",
"setup/polyfills": "src/setup/polyfills.ts",
"matchers/matchers": "src/matchers/matchers.ts",
"config/index": "src/config/index.ts",
"runner/vitest": "src/runner/vitest.ts",
"runner/bun-test": "src/runner/bun-test.ts",
"errors/index": "src/errors/index.ts",
"render/index": "src/render/index.ts",
"queries/queries": "src/queries/queries.ts",
"user/setup-user": "src/user/setup-user.ts",
},
formats: ["es"],
},
rollupOptions: {
treeshake: true,
output: {
preserveModules: true,
preserveModulesRoot: "src",
entryFileNames: "[name].js",
},
external: [
"@opentelemetry/api",
"@testing-library/dom",
"@testing-library/jest-dom",
"@testing-library/react",
"@testing-library/user-event",
"@vitejs/plugin-react",
"bun:test",
"dom-accessibility-api",
"happy-dom",
"react",
"react-dom",
"react/jsx-runtime",
"node:fs",
"node:path",
"node:url",
"node:util",
"node:crypto",
"tslib",
"vitest",
"vitest/config",
"zod",
/^node:/,
],
},
},
});