- Add README.md for project description and CLI usage - Create main application component with basic structure in app.tsx - Implement CodeMirror editor base functionality in editor.base.ts - Extend CodeMirror editor for JSON support in editor.json.ts - Add support for multiple languages in editor.ts - Create utility functions for editor manipulation in editor.utils.ts - Implement tab key formatting and indentation in tab.ts - Add Tailwind CSS integration in index.css - Develop JSON editor web component in json.ts - Create a template component for rendering in lib.ts - Set up main entry point in main.ts - Configure TypeScript settings in tsconfig.json - Define custom element typings in typings.d.ts - Configure Vite for library and application builds in vite.config.lib.ts and vite.config.ts
27 lines
568 B
TypeScript
27 lines
568 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
const plugins = [react(), tailwindcss()];
|
|
|
|
/**
|
|
* @see https://vitejs.dev/config/
|
|
*/
|
|
export default defineConfig({
|
|
plugins,
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
build: {
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'mod.ts'),
|
|
name: 'KvCode',
|
|
formats: ['es'],
|
|
fileName: () => `kv-code.js`,
|
|
},
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
}); |