enso/app/ide-desktop/lib/dashboard/vite.test.config.ts
somebody1234 d2f6b1026a
Refactor configuration keys out of repository (#8895)
- Close https://github.com/enso-org/cloud-v2/issues/866
- Remove *all* references to client keys and API base URLs from the codebase.
- The app can still be built by external contributors. *However*, the cloud backend (among some other things) will be completely disabled, as the required keys and base URLs will be missing.
- Add entry to `.gitignore` to allow `*.env` files in `app/ide-desktop/lib/dashboard/`

# Important Notes
- Tested (no `.env`; `.env` with prod backend; `.pbuchu.env`) on:
- `npm run dev` in `app/ide-desktop/lib/dashboard/`
- `./run ide build`
- `./run ide2 build`
- `./run gui watch`
2024-03-08 03:14:26 +00:00

50 lines
1.4 KiB
TypeScript

/** @file Configuration for vite. */
import * as vite from 'vite'
import config from './vite.config'
// =====================
// === Configuration ===
// =====================
/* eslint-disable @typescript-eslint/naming-convention */
const SERVER_PORT = 8080
export default vite.mergeConfig(
config,
vite.defineConfig({
resolve: {
extensions: [
'.mock.mjs',
'.mock.js',
'.mock.mts',
'.mock.ts',
'.mock.jsx',
'.mock.tsx',
'.mock.json',
'.mjs',
'.js',
'.mts',
'.ts',
'.jsx',
'.tsx',
'.json',
],
},
define: {
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.ENSO_CLOUD_REDIRECT': JSON.stringify(`http://localhost:${SERVER_PORT}`),
'process.env.ENSO_CLOUD_ENVIRONMENT': JSON.stringify('production'),
'process.env.ENSO_CLOUD_API_URL': JSON.stringify('https://mock'),
'process.env.ENSO_CLOUD_SENTRY_DSN': JSON.stringify(''),
'process.env.ENSO_CLOUD_STRIPE_KEY': JSON.stringify(''),
'process.env.ENSO_CLOUD_CHAT_URL': JSON.stringify(''),
'process.env.ENSO_CLOUD_COGNITO_USER_POOL_ID': JSON.stringify(''),
'process.env.ENSO_CLOUD_COGNITO_USER_POOL_WEB_CLIENT_ID': JSON.stringify(''),
'process.env.ENSO_CLOUD_COGNITO_DOMAIN': JSON.stringify(''),
'process.env.ENSO_CLOUD_COGNITO_REGION': JSON.stringify(''),
},
})
)