enso/app/ide-desktop/lib/dashboard/vite.config.ts
somebody1234 5f1333a519
Change dashboard to use 2 spaces for indentation (#8798)
This makes it consistent with the indentation style of GUI2.

# Important Notes
- This commit *will* need to be added to [`.git-blame-ignore-revs`](https://github.com/enso-org/enso/blob/develop/.git-blame-ignore-revs) *after* it is merged.
- This shouldn't need any particular QA (although QA doesn't hurt), as the only thing that was done is a `npx prettier -w .`, meaning that there should be zero logic changes.
2024-01-22 21:26:15 +00:00

37 lines
1.0 KiB
TypeScript

/** @file Configuration for vite. */
import * as url from 'node:url'
import vitePluginYaml from '@modyfi/vite-plugin-yaml'
import vitePluginReact from '@vitejs/plugin-react'
import * as vite from 'vite'
// =================
// === Constants ===
// =================
const SERVER_PORT = 8080
// =====================
// === Configuration ===
// =====================
/* eslint-disable @typescript-eslint/naming-convention */
export default vite.defineConfig({
server: { port: SERVER_PORT },
plugins: [vitePluginReact({ include: '**/*.tsx' }), vitePluginYaml()],
resolve: {
alias: {
'#': url.fileURLToPath(new URL('./src', import.meta.url)),
},
},
define: {
IS_VITE: JSON.stringify(true),
REDIRECT_OVERRIDE: JSON.stringify(`http://localhost:${SERVER_PORT}`),
CLOUD_ENV:
process.env.ENSO_CLOUD_ENV != null ? JSON.stringify(process.env.ENSO_CLOUD_ENV) : 'undefined',
// Single hardcoded usage of `global` in by aws-amplify.
'global.TYPED_ARRAY_SUPPORT': JSON.stringify(true),
},
})