mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
* Add component to show invite link (WIP) * Show invite link with copy functionality and QR-Code, add tests * Query secrets * Update directus collections * Add config and invite api * Let vite resolve paths using tsconfig * Redeem invite link when logged in or after logging in * Redirect to inviting profile when redeeming * Fix some logic with login and redeeming * Use correct redeem flow * Hide missing form error * Add basic relations view * Pass profile to redeem Api and adapt to changed redeem flow * Remove unnecessary aliases in vite config * Remove dead import * gitignore mac specific file * Remove lazy loading * Fix linting * add InviteApi import * Change case of file name (tbd) * Don't toast error if user profile was not loaded yet * Fix casing * avoid app crash when profile of a new item is opened --------- Co-authored-by: Anton Tranelis <mail@antontranelis.de>
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import fs from 'fs'
|
|
import path from 'path'
|
|
import tsConfigPaths from 'vite-tsconfig-paths'
|
|
|
|
// __dirname-Ersatz für ESModules
|
|
const __dirname = path.dirname(new URL(import.meta.url).pathname)
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
host: true,
|
|
port: 5174,
|
|
/**
|
|
* https: {
|
|
* key: fs.readFileSync(path.resolve(__dirname, 'localhost-key.pem')),
|
|
* cert: fs.readFileSync(path.resolve(__dirname, 'localhost-cert.pem')),
|
|
* },
|
|
*/
|
|
},
|
|
plugins: [react(), tailwindcss(), tsConfigPaths()],
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom', 'react-router-dom'],
|
|
},
|
|
build: {
|
|
sourcemap: true,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: (id) => {
|
|
if (id.includes('lib/src')) {
|
|
return 'utopia-ui'
|
|
}
|
|
if (id.includes('node_modules')) {
|
|
if (id.includes('react')) {
|
|
return 'react'
|
|
}
|
|
if (id.includes('tiptap')) {
|
|
return 'tiptap'
|
|
}
|
|
if (id.includes('leaflet')) {
|
|
return 'leaflet'
|
|
}
|
|
if (id.includes('lib/node_modules')) {
|
|
return 'utopia-ui-vendor'
|
|
} else return 'vendor'
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
})
|