From e7915342cb434ea871394e969d166f8987083642 Mon Sep 17 00:00:00 2001 From: Billie Hilton Date: Wed, 17 May 2023 13:18:24 -0400 Subject: [PATCH] fix(ruleset-bundler): remove extraneous 'external dependency' warnings (#2475) --- packages/ruleset-bundler/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/ruleset-bundler/src/index.ts b/packages/ruleset-bundler/src/index.ts index 3a9fb6c42..38c7920df 100644 --- a/packages/ruleset-bundler/src/index.ts +++ b/packages/ruleset-bundler/src/index.ts @@ -35,6 +35,14 @@ export async function bundleRuleset( if (e.code === 'MISSING_NAME_OPTION_FOR_IIFE_EXPORT') { return; } + // The Spectral packages themselves are not included in the bundle. + if ( + e.code === 'UNRESOLVED_IMPORT' && + typeof e.source === 'string' && + e.source.startsWith('@stoplight/spectral') + ) { + return; + } fn(e); },