feat: add a middleware integration option #9
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.
Implement Middleware Approach for Vite Integration
This PR implements a middleware-style approach for integrating Vite with Go web applications, as discussed in issue #8. The goal is to provide more flexibility and a cleaner separation of concerns while maintaining ease of use.
Key Changes
vite.Middleware
as a standalone component, decoupled fromvite.Handler
.New Features
vite.Middleware
: A flexible middleware component that can be easily integrated with various routing solutions.Example Usage
Benefits
Documentation
vite.Middleware
component.Backwards Compatibility
This PR maintains support for the existing
vite.Handler
approach, ensuring backwards compatibility with current implementations.Feedback and suggestions are welcome. Please let me know if you'd like to see any changes or additions to this implementation.