mirror of
https://github.com/status-im/dappconnect-chat-sdk.git
synced 2025-01-11 22:45:03 +00:00
a083d3251b
* install `js-waku@^0.24.0` * install `js-waku@^0.25.0` * resolve some breaking changes * add timeout * upgrade `eslint-import-resolver-typescript` * add `process.env.VITEST` condition * increase timeout * fixup * ignore `emitSelf` * replace `parcel` with `vite` * update `.gitignore` * change `dev` npm script * fix favicon href * load `.env` files * remove 'alias" * add `preview` * upgrade vite * set `target`s in `vite.config.ts` * upgrade `@vitejs/plugin-react` * remove comment * Update package.json * Update vite.config.ts
33 lines
798 B
TypeScript
33 lines
798 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig, loadEnv } from 'vite'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
return {
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
target: 'es2020',
|
|
},
|
|
},
|
|
build: {
|
|
target: 'es2020',
|
|
},
|
|
plugins: [react()],
|
|
define: {
|
|
/**
|
|
* Loads `.env` files and sets `process.env` varibales.
|
|
*
|
|
* @see https://vitejs.dev/config/#environment-variables
|
|
* @see https://vitejs.dev/config/shared-options.html#define
|
|
*/
|
|
...Object.entries(loadEnv(mode, process.cwd(), '')).reduce(
|
|
(variables, [key, value]) => ({
|
|
...variables,
|
|
[`process.env.${key}`]: `'${value}'`, // notice ''
|
|
}),
|
|
{}
|
|
),
|
|
},
|
|
}
|
|
})
|