TidGi-Desktop/vite.renderer.config.ts
lin onetwo 3718d0bd39
Fix/edit agent and several bugs (#670)
* refactor: simplify tool writing

* feat: load prompt from plugin in a wiki, let agent know what to do

based on https://github.com/TiddlyWiki/TiddlyWiki5/issues/9378

* fix: i18n

fix: i18n

fix: wrong i18n structure

fix: empty i18n

* Add ContentLoading component and suspense fallback

* fix: monaco loading

* docs: usage of chrome mcp to contron during dev

* fix: provider config truncate user input when typing

* fix: legacy usage

* Update package.json

* fix: not loadin initial data

* feat: better prompt sort

* fix: sorting of array

* fix: drag

* Create DragAndDrop.md

* feat: directly enter edit mode

* fix: workspace config change cause immediate main wiki restart

* Add 'Press Enter to confirm' to tag help texts

* fix: dont show system tag when adding sub wiki

* feat: inform user to press enter on tag auto complete

* refactor: let sub wiki auto complete tag

* Revert Add 'Press Enter to confirm' to tag help texts

* fix: not able to open prompt editor by click prompt tree

* fix: click to open plugin config

* chore: remove log

* feat: Auto-select the first file if none is selected

* fix: don't preview not enabled prompt parts

* fix: Keep i18n ally think these keys exist, otherwise it will delete them during "check usage"

* lint: fix

* Update externalAPI.logging.test.ts
2025-12-15 17:33:59 +08:00

43 lines
1.1 KiB
TypeScript

import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import { analyzer } from 'vite-bundle-analyzer';
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
export default defineConfig({
plugins: [
...(process.env.ANALYZE === 'true'
? [analyzer({ analyzerMode: 'static', openAnalyzer: false, fileName: 'bundle-analyzer-renderer' })]
: []),
react(),
monacoEditorPlugin({}),
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'@services': path.resolve(__dirname, './src/services'),
},
},
optimizeDeps: {
include: ['monaco-editor'],
},
build: {
// Output to .vite/renderer for consistency
outDir: '.vite/renderer',
// Specify the HTML entry point
rollupOptions: {
input: path.resolve(__dirname, 'index.html'),
output: {
manualChunks: {
'monaco-editor': ['monaco-editor'],
},
},
},
commonjsOptions: {
include: [/monaco-editor/, /node_modules/],
},
},
server: {
port: 3012, // Match the port from webpack config
},
});