fix(nitro): ensure that nitro runtime is not externalized (#121)

This commit is contained in:
Alexander Lichter 2021-04-28 15:32:26 +02:00 committed by GitHub
parent 2a2c4d5e46
commit 813df279ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}