mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
feat: use h2@10
This commit is contained in:
parent
02a66ab40c
commit
cd0dd009e0
@ -8,7 +8,8 @@ import * as PRESETS from './presets'
|
|||||||
export interface ServerMiddleware {
|
export interface ServerMiddleware {
|
||||||
route: string
|
route: string
|
||||||
handle: string
|
handle: string
|
||||||
lazy?: boolean
|
lazy?: boolean // Default is true
|
||||||
|
promisify?: boolean // Default is true
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SigmaContext {
|
export interface SigmaContext {
|
||||||
|
@ -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')}
|
${sigmaContext.middleware.filter(m => m.lazy).map(m => `const ${getImportId(m.handle)} = () => import('${m.handle}');`).join('\n')}
|
||||||
|
|
||||||
export default [
|
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')}
|
||||||
];
|
];
|
||||||
`
|
`
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user