-
Notifications
You must be signed in to change notification settings - Fork 18
/
vite.config.ts
44 lines (43 loc) · 1.3 KB
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import iteriaLowcode from '@iteria-app/vite-plugin-lowcode'
import path from 'path'
export default ({ command, mode }) => {
const env = loadEnv(mode, '.')
return defineConfig({
optimizeDeps: {
exclude: ['@iteria-app/wysiwyg'],
include: ['@iteria-app/component-templates'],
},
resolve: {
alias: {
os: 'os-browserify',
path: 'path-browserify',
module: path.resolve(__dirname, './src/constants.ts'),
},
},
plugins: [
react(),
iteriaLowcode({
command,
mode,
graphQLEndpoint: env.VITE_HASURA_GRAPHQL_ENDPOINT,
graphQLSecret: env.VITE_HASURA_GRAPHQL_SECRET,
cwd: process.cwd(),
injectLowcode: true,
injectMode: env.VITE_NETLIFY ? "jamstack" : env.VITE_INJECT_MODE,
features: {
tippy: true,
generator: true,
addFields: true,
translations: true,
themeEditor: true,
graphQLEndpoint: true,
floatingButton: true,
},
version: "1.10.0",
whitelistedEnvs: ['VITE_HASURA_GRAPHQL_ENDPOINT', 'VITE_HASURA_GRAPHQL_SECRET', 'VITE_BRANCH', 'VITE_REPOSITORY_URL', 'VITE_SITE_ID', 'VITE_NETLIFY']
}),
],
})
}