Initial Commit
This commit is contained in:
61
packages/foundation/data/packer/vite.config.ts
Normal file
61
packages/foundation/data/packer/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/packer",
|
||||
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",
|
||||
"chunked/index": "src/chunked/index.ts",
|
||||
"streaming/index": "src/streaming/index.ts",
|
||||
"error-codes": "src/error-codes.ts",
|
||||
"flags/flags": "src/flags/flags.ts",
|
||||
"plugins/plugins": "src/plugins/plugins.ts",
|
||||
"schemas/registration": "src/schemas/registration.ts",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@suaveplan/bitpacker",
|
||||
"@suaveplan/crypto",
|
||||
"@suaveplan/crypto-hash",
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/events",
|
||||
"@suaveplan/feature-flags",
|
||||
"@suaveplan/idempotency",
|
||||
"@suaveplan/mime",
|
||||
"@suaveplan/opentelemetry",
|
||||
"@suaveplan/retry",
|
||||
"@suaveplan/schema-registry",
|
||||
"@suaveplan/streams",
|
||||
"@suaveplan/types",
|
||||
"@opentelemetry/api",
|
||||
"@noble/hashes",
|
||||
/^@noble\/hashes\//,
|
||||
"tslib",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user