Initial Commit
This commit is contained in:
72
packages/foundation/data/pwa/vite.config.ts
Normal file
72
packages/foundation/data/pwa/vite.config.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
export default defineConfig({
|
||||
root: __dirname,
|
||||
cacheDir: "../../../../node_modules/.vite/packages/pwa",
|
||||
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",
|
||||
"errors/errors": "src/errors/errors.ts",
|
||||
"schemas/schemas": "src/schemas/schemas.ts",
|
||||
"observability/observability":
|
||||
"src/observability/observability.ts",
|
||||
"service-worker/service-worker":
|
||||
"src/service-worker/service-worker.ts",
|
||||
"update-controller/update-controller":
|
||||
"src/update-controller/update-controller.ts",
|
||||
"sync-queue/sync-queue": "src/sync-queue/sync-queue.ts",
|
||||
"sync-queue/memory-store": "src/sync-queue/memory-store.ts",
|
||||
"sync-queue/local-storage-store":
|
||||
"src/sync-queue/local-storage-store.ts",
|
||||
"sync-queue/indexeddb-store":
|
||||
"src/sync-queue/indexeddb-store.ts",
|
||||
"sync-queue/background-sync":
|
||||
"src/sync-queue/background-sync.ts",
|
||||
"sync-queue/version-migration":
|
||||
"src/sync-queue/version-migration.ts",
|
||||
"push-notifications/push-notifications":
|
||||
"src/push-notifications/push-notifications.ts",
|
||||
"push-notifications/vapid":
|
||||
"src/push-notifications/vapid.ts",
|
||||
"install-prompt/install-prompt":
|
||||
"src/install-prompt/install-prompt.ts",
|
||||
"caching-strategies/caching-strategies":
|
||||
"src/caching-strategies/caching-strategies.ts",
|
||||
"caching-strategies/router":
|
||||
"src/caching-strategies/router.ts",
|
||||
"manifest/manifest": "src/manifest/manifest.ts",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/opentelemetry",
|
||||
"@suaveplan/types",
|
||||
"@opentelemetry/api",
|
||||
"tslib",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user