# Single-File HTML Bundler Progress
**Date**: November 15, 2025
**Goal**: Create completely self-contained HTML file for IPFS upload and objkt.com NFT minting
## What We Built
### ac-pack-single-file.mjs (510 lines)
A Node.js build script that generates a single 7.75 MB HTML file containing:
- ✅ 502 embedded files (461 from ac/, 41 from type/)
- ✅ 318 JavaScript modules as blob URLs
- ✅ All KidLisp code and dependencies
- ✅ Font drawings (113+ JSON files with URL-encoded names)
- ✅ Virtual FileSystem (VFS) with fetch/XHR interception
- ✅ Import map for ES module resolution
- ✅ No external network requests (except expected CSS fallbacks)
## Current Status
### ✅ Working Features
1. **XHR Interception** - All 113+ font drawings loading from VFS
2. **Fetch Interception** - painting.mjs and other modules served from VFS
3. **URL Decoding** - Handles %20, special characters (í, ø), etc.
4. **Path Normalization** - Strips aesthetic.computer/, adds ac/ prefix
5. **Blob URL Creation** - 318 JavaScript modules converted to blob URLs
6. **Import Rewriting** - Relative paths (../, ./) rewritten to absolute
7. **Module Path Array** - Pre-computed list of all .js/.mjs files
8. **Import Map Generation** - Dual-path mapping for legacy/normalized imports
### ❌ Known Issues (Need Fixes)
1. **sfx.mjs 404** - Import map missing `/aesthetic.computer/` prefix paths
2. **CSS files 404** - Font CSS files not included in VFS (ywft-processing-*.css, berkeley-mono-variable.css)
3. **Cursor SVG 404** - precise.svg not included in VFS (in cursors/ directory)
4. **painting.lisp 404** - Expected (not included in bundle, external resource)
### 🔧 Fixes Needed
1. **Import Map**: Add entries with leading slash: `/aesthetic.computer/disks/common/sfx.mjs`
2. **VFS**: Include `type/webfonts/*.css` files
3. **VFS**: Include `aesthetic.computer/cursors/*.svg` files
4. **Fetch Intercept**: Handle CSS file requests
### 🔧 Last Fix Applied
**Script Block Scope Bug** (lines 203-287):
- **Problem**: `const modulePaths` defined in first `