mirror of
https://github.com/dergigi/boris.git
synced 2026-02-01 05:04:29 +01:00
revert: remove custom applesauce resolver plugin from Vite config
- Remove applesauceResolver workaround - Keep Vite config clean and standards-compliant - We'll address applesauce-core resolution via proper imports and package fixes
This commit is contained in:
@@ -1,24 +1,8 @@
|
||||
import { defineConfig, Plugin } from 'vite'
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
// Custom plugin to resolve applesauce-core internal modules
|
||||
// Workaround for restrictive exports field blocking internal imports
|
||||
const applesauceResolver = (): Plugin => ({
|
||||
name: 'applesauce-resolver',
|
||||
resolveId(source, importer) {
|
||||
if (importer && source.startsWith('./') && importer.includes('applesauce-core/dist/event-store')) {
|
||||
// Resolve relative imports within applesauce-core/dist/event-store
|
||||
const resolved = path.resolve(path.dirname(importer), source)
|
||||
return resolved
|
||||
}
|
||||
return null
|
||||
}
|
||||
})
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), applesauceResolver()],
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 9802
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user