vibetunnel/web/scripts/esbuild-config.js
Mario Zechner 762ebc0196 feat: Replace CodeMirror with Monaco Editor
- Add Monaco Editor (v0.52.2) as dependency
- Create MonacoEditor Lit component with normal and diff modes
- Support inline/side-by-side diff switching with responsive behavior
- Replace CodeMirror in file browser with Monaco
- Add /api/fs/diff-content endpoint for fetching original/modified content
- Update build system to use esbuild with Monaco plugin
- Add proper Monaco asset handling and bundling
- Style Monaco with VibeTunnel dark theme

Note: There are rendering artifacts that need to be addressed

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-23 03:14:45 +02:00

44 lines
No EOL
770 B
JavaScript

/**
* ESBuild configuration for VibeTunnel web client
*/
const { monacoPlugin } = require('./monaco-plugin.js');
const commonOptions = {
bundle: true,
format: 'esm',
loader: {
'.ts': 'ts',
'.tsx': 'tsx',
'.js': 'js',
'.jsx': 'jsx',
'.css': 'css',
'.ttf': 'file',
'.woff': 'file',
'.woff2': 'file',
},
define: {
'process.env.NODE_ENV': '"production"',
},
external: [],
plugins: [monacoPlugin],
// Allow importing from node_modules without issues
mainFields: ['module', 'main'],
};
const devOptions = {
...commonOptions,
sourcemap: true,
minify: false,
};
const prodOptions = {
...commonOptions,
sourcemap: false,
minify: true,
};
module.exports = {
commonOptions,
devOptions,
prodOptions,
};