A high-performance, extensible word processor built with native web technologies and powered by Rolldown for ultra-fast builds.
- 🚀 Native web components (no frameworks)
- ⚡ Rolldown bundling - Ultra-fast Rust-based bundler
- 📝 Rich text editing with modern APIs
- 🎨 Customizable themes (light/dark)
- 💾 Local storage with IndexedDB
- 🔍 Search and replace
- ✅ Spell checking
- 📊 Real-time word count
- 🖨️ Print and export support
- 🧩 Extensible plugin system
- 🦀 WebAssembly-powered performance
- Clone or download this project
- Open a terminal in the project directory
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open http://localhost:8000 in your browser
- Clone or download this project
- Open a terminal in the project directory
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open http://localhost:8000 in your browser
This project uses Rolldown - an ultra-fast Rust-based JavaScript bundler that provides lightning-fast builds and optimal performance.
# Standard development server
npm run dev # Simple file server (fastest startup)
npm start # Alias for dev
# Development with bundling
npm run dev:bundle # Rolldown + dev server (fast rebuilds)
npm run bundle:dev # Development bundle only
npm run bundle:watch # Watch mode with auto-rebuild# Full production build
npm run build:prod # Complete optimized build
# Rolldown-only bundling
npm run bundle:prod # Production bundle (minified, optimized)
npm run bundle:analysis # Bundle analysis with size reports# Integrated builds (full pipeline + bundling)
npm run build # Standard build
npm run build:dev # Development build with Rolldown
npm run build:rolldown # Build with Rolldown bundling
npm run build:analysis # Build with bundle analysis
# Advanced options
npm run preview # Preview production build
npm run clean # Clean dist directory- ⚡ Ultra-fast bundling with Rolldown (Rust-based)
- 🔍 Tree shaking for optimal bundle size
- 📦 Code splitting and chunk optimization
- 🗺️ Source maps for development and debugging
- 📊 Bundle analysis with detailed size reports
- 🏗️ Modern ES modules with import/export
- 🔧 Path aliases (@components, @utils, @styles)
- 💎 Production optimization (minification, compression)
The word processor exposes a rich API for extensions:
// Get the editor instance
const editor = document.querySelector("word-editor");
// Basic operations
await editor.exec("bold");
await editor.exec("italic");
await editor.setContent("<p>Hello world</p>");
const content = editor.getContent();
// History
await editor.undo();
await editor.redo();The bundler configuration is located in build/rolldown.config.js. Key features:
- Multiple build modes: dev, prod, analysis
- Path aliases:
@components,@utils,@styles - Advanced chunking: Automatic code splitting
- Tree shaking: Dead code elimination
- Source maps: Inline (dev) or external (prod)
- Asset optimization: File hashing and compression
// build/rolldown.config.js
export const rolldownConfig = {
dev: {
/* fast development builds */
},
prod: {
/* optimized production builds */
},
analysis: {
/* detailed bundle analysis */
},
};- Build speed: ~30ms for full production builds
- Bundle size: Highly optimized (example: 1.3KB main bundle)
- Development: Near-instant rebuilds with watch mode
- Modern output: ES2020+ with tree shaking
The project supports WebAssembly modules for performance-critical operations:
# Build WASM modules
npm run wasm:build # Build Rust to WASM
npm run wasm:pack # Package with wasm-packMIT