mirror of
https://github.com/selfxyz/self.git
synced 2026-01-10 15:18:18 -05:00
* Revert "fix yarn web (#814)" This reverts commitbf158fd977. * Revert "add hermes ios engine" This reverts commitf6defcfb12. * Revert "codex feedback" This reverts commitdf35a47f72. * Revert "merge with dev" This reverts commit47a8d9d2f1. * Revert "update Gemfile.lock and remove lock when reinstalling" This reverts commit5f25752f77. * Revert "test package update" This reverts commit19dcba0e42. * Revert "revert install cmd changes" This reverts commit5427bd12a1. * Revert "Fix CI build by excluding nokogiri in GitHub Actions/Act environments" This reverts commitdbff69a13e. * Revert "prettier" This reverts commit87f421456f. * Revert "fix building" This reverts commitfbbefd2a3d. * Revert "optimize path resolving" This reverts commit23b1118b8e. * Revert "fix loading" This reverts commitf0c884b43b. * Revert "clean up dupe bundle install" This reverts commit5428567bbe. * Revert "fix metro loading" This reverts commit3a766001dc. * Revert "remove passport provider lazy loading" This reverts commit5f793a54b3. * Revert "allow cursor to edit Gemfile and update lock file" This reverts commitb6f7158e8e. * Revert "Update Gemfile.lock to exclude nokogiri in CI environments" This reverts commit243640152d. * Revert "fix install commands" This reverts commit2dc7d7c1c9. * Revert "fix imports and test" This reverts commit83d6308029. * Revert "fix import" This reverts commitfa42b07ce4. * Revert "update build checks" This reverts commitb281f15a16. * Revert "save updated imports" This reverts commit215bca4bee. * Revert "fix build command" This reverts commit37f95bc8fb. * Revert "build dependencies before linting" This reverts commit9e57e017ca. * Revert "lint suggestions" This reverts commitff9b9d2c7c. * Revert "fix type. more opportunities" This reverts commit7ad82d5817. * Revert "add typing to crypto loader" This reverts commitd55eec8f44. * Revert "yarn nice" This reverts commitdf1c2dbd9b. * Revert "update lock" This reverts commit04692ba3b5. * Revert "cm feedback" This reverts commit848071f315. * fix file name * fix web loading * fix border width styling * fix package commands * fix import and update lock * fixes from reverted commits * more fixes for web building * fix yarn web:build * add yarn web:build workflow * cm feedback * final fixes * fix for and vitge * fix loading
115 lines
3.3 KiB
TypeScript
115 lines
3.3 KiB
TypeScript
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
|
|
|
import { tamaguiPlugin } from '@tamagui/vite-plugin';
|
|
import react from '@vitejs/plugin-react-swc';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
import { defineConfig } from 'vite';
|
|
import svgr from 'vite-plugin-svgr';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
export default defineConfig({
|
|
root: 'web',
|
|
publicDir: 'web',
|
|
envDir: '..', // This is the directory where Vite will look for .env files relative to the root
|
|
resolve: {
|
|
extensions: [
|
|
'.web.tsx',
|
|
'.web.js',
|
|
'.web.jsx',
|
|
'.web.ts',
|
|
'.tsx',
|
|
'.ts',
|
|
'.jsx',
|
|
'.js',
|
|
],
|
|
alias: {
|
|
'@env': path.resolve(__dirname, 'env.ts'),
|
|
'/src': path.resolve(__dirname, 'src'),
|
|
'react-native-svg': 'react-native-svg-web',
|
|
'lottie-react-native': 'lottie-react',
|
|
'react-native-safe-area-context': path.resolve(
|
|
__dirname,
|
|
'src/mocks/react-native-safe-area-context.js',
|
|
),
|
|
'react-native-gesture-handler': path.resolve(
|
|
__dirname,
|
|
'src/mocks/react-native-gesture-handler.ts',
|
|
),
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
svgr({
|
|
include: '**/*.svg',
|
|
}),
|
|
tamaguiPlugin({
|
|
config: path.resolve(__dirname, 'tamagui.config.ts'),
|
|
components: ['tamagui'],
|
|
enableDynamicEvaluation: true,
|
|
excludeReactNativeWebExports: [
|
|
'Switch',
|
|
'ProgressBar',
|
|
'Picker',
|
|
'CheckBox',
|
|
'Touchable',
|
|
],
|
|
platform: 'web',
|
|
optimize: true,
|
|
}),
|
|
].filter(Boolean),
|
|
define: {
|
|
global: 'globalThis',
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
'vendor-react': [
|
|
'react',
|
|
'react-dom',
|
|
'@react-navigation/native',
|
|
'@react-navigation/native-stack',
|
|
],
|
|
'vendor-ui': ['tamagui', '@tamagui/lucide-icons', '@tamagui/toast'],
|
|
'vendor-crypto': [
|
|
'elliptic',
|
|
'node-forge',
|
|
'ethers',
|
|
'@peculiar/x509',
|
|
'pkijs',
|
|
'asn1js',
|
|
'@stablelib/cbor',
|
|
],
|
|
'vendor-device': [
|
|
'react-native-nfc-manager',
|
|
'react-native-gesture-handler',
|
|
'react-native-haptic-feedback',
|
|
],
|
|
'vendor-analytics': [
|
|
'@segment/analytics-react-native',
|
|
'@sentry/react',
|
|
'@sentry/react-native',
|
|
],
|
|
'vendor-animations': ['lottie-react-native', 'lottie-react'],
|
|
'vendor-cloud': [
|
|
'@robinbobin/react-native-google-drive-api-wrapper',
|
|
'react-native-cloud-storage',
|
|
],
|
|
'screens-passport': [
|
|
'./src/navigation/passport.ts',
|
|
'./src/utils/nfcScanner.ts',
|
|
],
|
|
'screens-prove': ['./src/navigation/prove.ts', './src/utils/proving'],
|
|
'screens-settings': ['./src/navigation/settings.ts'],
|
|
'screens-recovery': ['./src/navigation/recovery.ts'],
|
|
'screens-dev': ['./src/navigation/dev.ts'],
|
|
'screens-aesop': ['./src/navigation/aesop.ts'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|