mirror of
https://github.com/dergigi/boris.git
synced 2026-01-31 20:54:41 +01:00
revert: use documented applesauce imports; remove alias shim
- Import EventStore from 'applesauce-core' - Remove Vite alias/shim and node:path reference - Keep config minimal and standard-compliant
This commit is contained in:
@@ -3,7 +3,7 @@ import { BrowserRouter, Routes, Route, Navigate } from 'react-router-dom'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
|
||||
import { EventStoreProvider, AccountsProvider, Hooks } from 'applesauce-react'
|
||||
import { EventStore } from 'applesauce-core/dist/event-store/event-store.js'
|
||||
import { EventStore } from 'applesauce-core'
|
||||
import { AccountManager } from 'applesauce-accounts'
|
||||
import { registerCommonAccountTypes } from 'applesauce-accounts/accounts'
|
||||
import { RelayPool } from 'applesauce-relay'
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-expect-error Node built-in types may be missing in editor, available at build time
|
||||
import path from 'node:path'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
@@ -13,12 +10,7 @@ export default defineConfig({
|
||||
extensions: ['.js', '.ts', '.tsx', '.json'],
|
||||
conditions: ['import', 'module', 'browser', 'default'],
|
||||
preserveSymlinks: false,
|
||||
mainFields: ['module', 'jsnext:main', 'jsnext', 'main'],
|
||||
alias: {
|
||||
// applesauce-core publishes async-event-store.js in some environments, but exports map can block deep resolution on Vercel
|
||||
// We don't use the async store; stub it to avoid bundler trying to resolve it
|
||||
'applesauce-core/dist/event-store/async-event-store.js': path.resolve(new URL('./src/shims/applesauce/async-event-store.js', import.meta.url).pathname)
|
||||
}
|
||||
mainFields: ['module', 'jsnext:main', 'jsnext', 'main']
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['applesauce-core', 'applesauce-factory', 'applesauce-relay', 'applesauce-react'],
|
||||
|
||||
Reference in New Issue
Block a user