feat: use h2@10

This commit is contained in:
Pooya Parsa 2020-11-20 21:06:59 +01:00
parent 02a66ab40c
commit cd0dd009e0
2 changed files with 3 additions and 2 deletions

View File

@ -8,7 +8,8 @@ import * as PRESETS from './presets'
export interface ServerMiddleware {
route: string
handle: string
lazy?: boolean
lazy?: boolean // Default is true
promisify?: boolean // Default is true
}
export interface SigmaContext {

View File

@ -126,7 +126,7 @@ export const getRollupConfig = (sigmaContext: SigmaContext) => {
${sigmaContext.middleware.filter(m => m.lazy).map(m => `const ${getImportId(m.handle)} = () => import('${m.handle}');`).join('\n')}
export default [
${sigmaContext.middleware.map(m => `{ route: '${m.route}', handle: ${getImportId(m.handle)}, lazy: ${m.lazy || false} }`).join(',\n')}
${sigmaContext.middleware.map(m => `{ route: '${m.route}', handle: ${getImportId(m.handle)}, lazy: ${m.lazy || true}, promisify: ${m.promisify || true} }`).join(',\n')}
];
`
}))