Initial Commit
This commit is contained in:
73
packages/localization/i18n/react-i18n/vite.config.ts
Normal file
73
packages/localization/i18n/react-i18n/vite.config.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
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-i18n",
|
||||
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",
|
||||
"provider/index": "src/provider/index.ts",
|
||||
"errors/index": "src/errors/index.ts",
|
||||
"schemas/index": "src/schemas/index.ts",
|
||||
"config/index": "src/config/index.ts",
|
||||
"observability/react-i18n-metrics":
|
||||
"src/observability/react-i18n-metrics.ts",
|
||||
"components/trans/trans": "src/components/trans/trans.tsx",
|
||||
"components/language-switcher/language-switcher":
|
||||
"src/components/language-switcher/language-switcher.tsx",
|
||||
"components/missing-key-overlay/missing-key-overlay":
|
||||
"src/components/missing-key-overlay/missing-key-overlay.tsx",
|
||||
"components/i18n-suspense/i18n-suspense":
|
||||
"src/components/i18n-suspense/i18n-suspense.tsx",
|
||||
"hoc/with-translation/with-translation":
|
||||
"src/hoc/with-translation/with-translation.tsx",
|
||||
},
|
||||
formats: ["es"],
|
||||
},
|
||||
rollupOptions: {
|
||||
treeshake: true,
|
||||
output: {
|
||||
preserveModules: true,
|
||||
preserveModulesRoot: "src",
|
||||
entryFileNames: "[name].js",
|
||||
},
|
||||
external: [
|
||||
"@opentelemetry/api",
|
||||
"@suaveplan/error",
|
||||
"@suaveplan/events",
|
||||
"@suaveplan/i18n",
|
||||
"@suaveplan/i18n/plugin",
|
||||
/^@suaveplan\/i18n-detector(\/.*)?$/,
|
||||
/^@suaveplan\/i18n-shared(\/.*)?$/,
|
||||
/^@suaveplan\/i18n-icu-parser(\/.*)?$/,
|
||||
/^@suaveplan\/i18n-formatter-currency(\/.*)?$/,
|
||||
/^@suaveplan\/i18n-formatter-date(\/.*)?$/,
|
||||
"@suaveplan/locale-data",
|
||||
"@suaveplan/logger",
|
||||
"@suaveplan/types",
|
||||
"@suaveplan/validation",
|
||||
"react",
|
||||
"react-dom",
|
||||
"react/jsx-runtime",
|
||||
"tslib",
|
||||
"zod",
|
||||
/^node:/,
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user