mirror of
https://github.com/status-im/wakuconnect-chat-sdk.git
synced 2025-01-09 11:45:42 +00:00
665d2df7e8
* scaffold website project with Next.js * set tamagui target * remove whitespace * update clean npm scripts * apply patches post-install * lock tamagui version * add patch-package to root * patch @tamagui/core-node * patch @tamagui/normalize-css-color * patch @achingbrain/ssdp * remove patches from website * update clean script in website * remove @tamagui/vite-plugin from dependencies * patch @tamagui/static * update node-version * define env vars
49 lines
1.1 KiB
TypeScript
49 lines
1.1 KiB
TypeScript
import { tamaguiPlugin } from '@tamagui/vite-plugin'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
import { defineConfig } from 'vite'
|
|
|
|
import { dependencies, peerDependencies } from './package.json'
|
|
|
|
const tamaguiConfig = {
|
|
components: [],
|
|
config: './src/tamagui.config.ts',
|
|
// useReactNativeWebLite: true,
|
|
}
|
|
|
|
const external = [
|
|
...Object.keys(dependencies || {}),
|
|
...Object.keys(peerDependencies || {}),
|
|
].map(name => new RegExp(`^${name}(/.*)?`))
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
return {
|
|
define: {
|
|
'process.env.TAMAGUI_TARGET': JSON.stringify('web'),
|
|
'process.env.INCLUDE_CSS_COLOR_NAMES': JSON.stringify(false),
|
|
},
|
|
build: {
|
|
target: 'es2020',
|
|
lib: {
|
|
entry: './src/index.tsx',
|
|
fileName: 'index',
|
|
formats: ['es', 'cjs'],
|
|
},
|
|
sourcemap: true,
|
|
emptyOutDir: mode === 'production',
|
|
rollupOptions: {
|
|
external,
|
|
},
|
|
},
|
|
|
|
plugins: [
|
|
react(),
|
|
tamaguiPlugin(tamaguiConfig),
|
|
// tamaguiExtractPlugin(tamaguiConfig),
|
|
],
|
|
|
|
test: {
|
|
environment: 'happy-dom',
|
|
},
|
|
}
|
|
})
|