Initial Commit
This commit is contained in:
90
packages/ui/react/react-auth/vite.config.ts
Normal file
90
packages/ui/react/react-auth/vite.config.ts
Normal file
@@ -0,0 +1,90 @@
|
||||
import react from "@vitejs/plugin-react";
|
||||
import { defineConfig } from "vite";
|
||||
import dts from "vite-plugin-dts";
|
||||
|
||||
export default defineConfig({
|
||||
root: __dirname,
|
||||
cacheDir: "../../../node_modules/.vite/packages/react-auth",
|
||||
plugins: [
|
||||
react(),
|
||||
dts({
|
||||
entryRoot: "src",
|
||||
tsconfigPath: "./tsconfig.lib.json",
|
||||
insertTypesEntry: true,
|
||||
}),
|
||||
],
|
||||
build: {
|
||||
outDir: "./dist",
|
||||
emptyOutDir: true,
|
||||
reportCompressedSize: true,
|
||||
sourcemap: true,
|
||||
lib: {
|
||||
entry: {
|
||||
index: "src/index.ts",
|
||||
"client/auth-client": "src/client/auth-client.ts",
|
||||
"lib/better-auth-adapter": "src/lib/better-auth-adapter.ts",
|
||||
"context/auth-context": "src/context/auth-context.tsx",
|
||||
"hooks/use-auth-guard": "src/hooks/use-auth-guard.ts",
|
||||
"hooks/use-permission": "src/hooks/use-permission.ts",
|
||||
"components/auth-guard/auth-guard":
|
||||
"src/components/auth-guard/auth-guard.tsx",
|
||||
"components/auth-provider/auth-provider":
|
||||
"src/components/auth-provider/auth-provider.tsx",
|
||||
"components/login-form/login-form":
|
||||
"src/components/login-form/login-form.tsx",
|
||||
"components/register-form/register-form":
|
||||
"src/components/register-form/register-form.tsx",
|
||||
"components/forgot-password-form/forgot-password-form":
|
||||
"src/components/forgot-password-form/forgot-password-form.tsx",
|
||||
"components/reset-password-form/reset-password-form":
|
||||
"src/components/reset-password-form/reset-password-form.tsx",
|
||||
"components/email-verification-view/email-verification-view":
|
||||
"src/components/email-verification-view/email-verification-view.tsx",
|
||||
"components/permission-gate/permission-gate":
|
||||
"src/components/permission-gate/permission-gate.tsx",
|
||||
"pages/login/login": "src/pages/login/login.tsx",
|
||||
"pages/register/register": "src/pages/register/register.tsx",
|
||||
"pages/forgot-password/forgot-password":
|
||||
"src/pages/forgot-password/forgot-password.tsx",
|
||||
"pages/reset-password/reset-password":
|
||||
"src/pages/reset-password/reset-password.tsx",
|
||||
"pages/email-verification/email-verification":
|
||||
"src/pages/email-verification/email-verification.tsx",
|
||||
"pages/profile/profile": "src/pages/profile/profile.tsx",
|
||||
"types/index": "src/types/index.ts",
|
||||
"translations/index": "src/translations/index.ts",
|
||||
"error-codes/error-codes": "src/error-codes/error-codes.ts",
|
||||
"observability/react-auth-metrics":
|
||||
"src/observability/react-auth-metrics.ts",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@hookform/resolvers",
|
||||
"@hookform/resolvers/zod",
|
||||
"@opentelemetry/api",
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/react-ui",
|
||||
"@suaveplan/types",
|
||||
"better-auth",
|
||||
"better-auth/client",
|
||||
"lucide-react",
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"react-hook-form",
|
||||
"react-router-dom",
|
||||
"tslib",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user