feat: Migrate to Svelte 5 with proper Vite configuration and component architecture#5
Merged
Merged
Conversation
- Fix import path in main.ts to use correct $lib alias - Add $lib path alias to vite.config.ts - Specify svelte.config.js location in vite plugin - Update HMR configuration for Svelte 5 (remove deprecated hot option) - Fix TypeScript errors in test file (remove invalid mode property) - Add Svelte components and state management - Update dependencies and configuration files
- Add development mode detection - In dev mode: use Bun's dev server with HMR support - In prod mode: explicitly return 404 for /_bun/* paths - Fixes failing e2e tests
- Use Bun's routes with HTML import to enable /_bun/asset/ transformation - Remove custom fetch handler in dev mode to let Bun handle all requests - This allows the HTML to be properly transformed with Bun asset paths
- Change from dynamic import to static import at top level - Bun's routes requires HTMLBundle, not a Promise - This allows proper /_bun/asset/ transformation
- Remove unused imports and variables from Svelte components - Fix TypeScript unused variable warnings - Clean up component code for better maintainability - Ensure all linting rules pass for CI
Resolved conflicts in bun.lock by regenerating with bun install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration to Svelte 5 with Modern Component Architecture
This PR migrates the application from the previous implementation to Svelte 5 with proper Vite configuration and a well-structured component architecture.
Changes Made
Infrastructure & Build System
Component Architecture
$stateand$propssyntaxApp.svelte- Main application componentVoiceInput.svelte- Speech recognition interfaceTextInput.svelte- Text input with draft modeOutput.svelte- Sanitized output displaySettings.svelte- API key and mode configurationCopyButton.svelte- Clipboard operationsHeader.svelte- Application headerTab.svelte- Navigation tabsState Management
$statestate.svelte.tsDeveloper Experience
$libalias resolutionTesting & CI
Technical Details
Breaking Changes
Benefits
Testing