From 813df279ec9025f69eaf24d07ad5d63e99d0dc21 Mon Sep 17 00:00:00 2001 From: Alexander Lichter Date: Wed, 28 Apr 2021 15:32:26 +0200 Subject: [PATCH] fix(nitro): ensure that nitro runtime is not externalized (#121) --- packages/nitro/src/rollup/plugins/externals.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nitro/src/rollup/plugins/externals.ts b/packages/nitro/src/rollup/plugins/externals.ts index 3c0de8ac74..64eff7b13c 100644 --- a/packages/nitro/src/rollup/plugins/externals.ts +++ b/packages/nitro/src/rollup/plugins/externals.ts @@ -26,7 +26,8 @@ export function externals (opts: NodeExternalsOptions): Plugin { const _id = id.split('node_modules/').pop() // Resolve relative paths and exceptions - if (_id.startsWith('.') || opts.ignore.find(i => _id.startsWith(i))) { + // Ensure to take absolute and relative id + if (_id.startsWith('.') || opts.ignore.find(i => _id.startsWith(i) || id.startsWith(i))) { return null }