Open
Description
Would be great to havea programmable API to use Klap for SSR apps.
something like this would be great:
import { App } from '@tinyhttp/app'
import { Bundler } from 'klap'
const isProd = process.env.NODE_ENV === 'production'
const app = new App()
const bundler = new Bundler({ source: 'index.html', dev: !isProd })
app.use(bundler.middleware)
if (!isProd) {
app.get('*', async (req, res) => {
await bundler.bundle()
res.sendFile('index.html')
})
}
// ...
Metadata
Metadata
Assignees
Labels
No labels