Commit fd07f2c
Migrate from webpack to Vite (#133)
## Summary
- Migrate the build system from webpack to Vite to align with jsbeeb dependency
- Add support for Monaco editor using vite-plugin-monaco-editor
- Fix all tests to work properly with JSDOM environment
- Update documentation and configuration files
## Details
This PR migrates the Owlet Editor from webpack to Vite. The primary motivation is to align with the jsbeeb dependency, which recently moved to Vite, causing integration challenges.
### Key Changes
- Replace webpack configuration with Vite equivalent
- Update package.json with Vite dependencies and scripts
- Configure Monaco editor with vite-plugin-monaco-editor
- Set up proper paths for jsbeeb ROM loading
- Fix path resolution for assets and imports
- Add test setup for proper JSDOM environment
- Update documentation in README.md
### Technical Implementation
- Use ESM import syntax throughout the codebase
- Implement proper static file copying with vite-plugin-static-copy
- Configure LESS preprocessing for styles
- Set up source maps for better debugging
- Implement favicon generation with vite-plugin-favicon
- Document known issue with Monaco editor source maps
## Test Plan
- All tests pass with vitest
- Development server works as expected with `make run`
- Production build generates correctly with `npm run build`
- Monaco editor functions properly with syntax highlighting
- jsbeeb emulator loads correctly with proper ROM paths
## Known Issues
- Minor source map warnings from Monaco editor (documented in README)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 20ee343 commit fd07f2c
24 files changed
Lines changed: 2116 additions & 5263 deletions
File tree
- public/assets
- images
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | | - | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments