Initial Commit
This commit is contained in:
61
packages/devtools/tooling/test-vite/vite.config.ts
Normal file
61
packages/devtools/tooling/test-vite/vite.config.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
export default defineConfig({
|
||||
root: __dirname,
|
||||
cacheDir: "../../../node_modules/.vite/packages/devtools-tooling-test-vite",
|
||||
plugins: [
|
||||
dts({
|
||||
entryRoot: "src",
|
||||
tsconfigPath: "./tsconfig.lib.json",
|
||||
insertTypesEntry: true,
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
outDir: "./dist",
|
||||
emptyOutDir: true,
|
||||
reportCompressedSize: true,
|
||||
sourcemap: true,
|
||||
lib: {
|
||||
entry: {
|
||||
index: "src/index.ts",
|
||||
"vite-library-config/index": "src/vite-library-config/index.ts",
|
||||
"vite-app-config/index": "src/vite-app-config/index.ts",
|
||||
"vitest-config/index": "src/vitest-config/index.ts",
|
||||
"vitest-browser-config/index":
|
||||
"src/vitest-browser-config/index.ts",
|
||||
"browser-environment/index": "src/browser-environment/index.ts",
|
||||
"tree-shake-validator/index":
|
||||
"src/tree-shake-validator/index.ts",
|
||||
"bundle-size-snapshot/index":
|
||||
"src/bundle-size-snapshot/index.ts",
|
||||
"port-allocator/index": "src/port-allocator/index.ts",
|
||||
"hmr-tester/index": "src/hmr-tester/index.ts",
|
||||
"matchers/index": "src/matchers/index.ts",
|
||||
"error-codes/index": "src/error-codes/index.ts",
|
||||
"telemetry/index": "src/telemetry/index.ts",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@opentelemetry/api",
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/types",
|
||||
"tslib",
|
||||
"vite",
|
||||
"vite-plugin-dts",
|
||||
"vitest",
|
||||
"vitest/config",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user