forked from jsnbuchanan/crowd-funder-for-time-pwa
WIP: Fix Electron build issues and migrate to @nostr/tools
- Fix TypeScript compilation errors in platform services - Add missing rotateCamera method and isNativeApp property - Fix index.html path resolution for packaged Electron apps - Create separate Vite config for Electron renderer process - Migrate from nostr-tools to @nostr/tools via JSR for ESM compatibility - Update all Vite configs to handle mixed npm/JSR package management - Add comprehensive documentation in BUILDING.md - Fix preload script path resolution in packaged builds Resolves build failures with deep imports and missing UI in AppImage.
This commit is contained in:
@@ -73,28 +73,20 @@ export async function createBuildConfig(mode: string): Promise<UserConfig> {
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'@nostr/tools': path.resolve(__dirname, 'node_modules/@nostr/tools'),
|
||||
'@nostr/tools/nip06': path.resolve(__dirname, 'node_modules/@nostr/tools/nip06'),
|
||||
...appConfig.aliasConfig,
|
||||
'path': path.resolve(__dirname, './src/utils/node-modules/path.js'),
|
||||
'fs': path.resolve(__dirname, './src/utils/node-modules/fs.js'),
|
||||
'crypto': path.resolve(__dirname, './src/utils/node-modules/crypto.js'),
|
||||
'nostr-tools/nip06': mode === 'development'
|
||||
? 'nostr-tools/nip06'
|
||||
: path.resolve(__dirname, 'node_modules/nostr-tools/nip06'),
|
||||
'nostr-tools/core': mode === 'development'
|
||||
? 'nostr-tools'
|
||||
: path.resolve(__dirname, 'node_modules/nostr-tools'),
|
||||
'nostr-tools': path.resolve(__dirname, 'node_modules/nostr-tools'),
|
||||
'dexie-export-import': path.resolve(__dirname, 'node_modules/dexie-export-import')
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'nostr-tools',
|
||||
'nostr-tools/nip06',
|
||||
'nostr-tools/core',
|
||||
'dexie-export-import',
|
||||
'@jlongster/sql.js'
|
||||
'@nostr/tools',
|
||||
'@nostr/tools/nip06',
|
||||
],
|
||||
exclude: isElectron ? [
|
||||
'register-service-worker',
|
||||
|
||||
Reference in New Issue
Block a user