diff --git a/packages/nitro/src/rollup/timing.ts b/packages/nitro/src/rollup/timing.ts index 97b26f1e53..f05e0d2b4d 100644 --- a/packages/nitro/src/rollup/timing.ts +++ b/packages/nitro/src/rollup/timing.ts @@ -25,7 +25,7 @@ export function timing (_opts: Options = {}): Plugin { renderChunk (code, chunk: RenderedChunk) { let name = chunk.fileName || '' name = name.replace(extname(name), '') - return "'use strict';" + HELPER + `${TIMING}.logStart('import:${name}');` + code + `;${TIMING}.logEnd('import:${name}');` + return "'use strict';" + (chunk.isEntry ? HELPER : '') + `${TIMING}.logStart('import:${name}');` + code + `;${TIMING}.logEnd('import:${name}');` } } }