code-run is a browser-based playground designed to eliminate bloat. You write code, you see the result—it’s that simple. Despite its minimal interface, it handles significant complexity behind the scenes, including preprocessing, flexible layout switching, and serverless support for Vue single-file components.
undefined values.import { thing } from 'pkg' and it will resolve. If unpkg fails to find the right version, you can define the import map manually.To get started locally, clone the repository and install dependencies:
git clone https://github.com/wanglin2/code-run.gitcd code-runnpm inpm run serve/code-run/. To change it:publicPath in vue.config.js.base field in src/config/index.js.routerMode in src/config/index.js. Note: If using history mode with nested paths, you may need to adjust the script asset links in /public/index.html.npm run build after modifying any configurations.code-run supports ES Modules (ESM) across JavaScript, TypeScript, CoffeeScript, and Vue. By default, a statement like import moment from 'moment' is transformed into import moment from 'https://unpkg.com/moment?module'.
However, some packages (like Vue) require specific builds. Because the default unpkg redirect often points to a bundler version rather than a browser-ready ESM build, you can use the editor's import map feature to point to the exact URL required.
npm run buildConsole: Compiles /public/console/index.js into an ES5 file (compile.js) for the preview iframe. This file should not be edited manually.npm run buildMonacoWorker: Repackages Monaco Editor web workers. Run this after updating the Monaco version.npm run convertTheme: Converts raw VSCode theme files into the format required by Monaco.npm run createThemeList: Scans the theme directory and automatically regenerates the configuration index.npm run buildVueSFCCompiler: Bundles the @vue/compiler-sfc used for Vue 3 support.
GRAG: Continuous Image Editing Control for DiT Models
YPrompt Review: Build Better AI Prompts With This Smart Tool
BuildAdmin: Vue3 ThinkPHP8 Panel With Visual CRUD Builder
Yank Note Review: A Hackable Markdown Editor That Runs Code
Scira: The Minimalist AI Search Engine for Grok, Claude, and Beyond
Kodi Setup Guide: Building a Powerful Media Center on Any Device
NotepadNext Installation Guide for Windows, Linux, and macOS
Memos Self-Hosted Note App: Lightweight Markdown and API-First
Bolo Blog: A Free Java Blog Engine with Markdown and Dark Mode
SmartPDF: Summarize PDFs with Llama 3.3
Lapce: A Fast, Rust-Powered Code Editor with Remote Development
sherpa-onnx: Offline Speech Recognition, TTS, and VAD Without the Cloud