This task can be performed using Eleva.js
Pure JavaScript, Pure Performance, Simply Elegant.
Best product for this task

Eleva.js
dev-tools
A minimalist, lightweight, pure vanilla JavaScript frontend runtime framework.
JavaScriptFrontendFrameworkFrontend FrameworkDeveloper ToolsOpen SourceWeb DevelopmentDev ToolsEleva.jsEleva

What to expect from an ideal product
- Skips bundling and heavy frameworks to load pages instantly
- Uses pure JavaScript without dependencies for better speed
- Keeps code simple and lightweight through vanilla approach
- Loads only needed code when users interact with pages
- Handles routing and updates without refreshing the whole page