Skip to content

Commit

Permalink
env validation for react-vite
Browse files Browse the repository at this point in the history
  • Loading branch information
SaqibAltaf committed Sep 26, 2024
1 parent a2eb7b1 commit 4c52388
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions apps/react-vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ import { Schema, ValidateEnv } from '@julr/vite-plugin-validate-env';

export default defineConfig({
base: './',
plugins: [react(), viteTsconfigPaths(), ValidateEnv({
VITE_APP_API_URL: Schema.string(),
VITE_APP_ENABLE_API_MOCKING: Schema.boolean(),
}),],
plugins: [
react(),
viteTsconfigPaths(),
ValidateEnv({
VITE_APP_API_URL: Schema.string(),
VITE_APP_ENABLE_API_MOCKING: Schema.boolean(),
}),
],
server: {
port: 3000,
},
Expand Down

0 comments on commit 4c52388

Please sign in to comment.