Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(workspace): Fix detection of non-ESM builds (#2860)

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>

authored by

Phil Pluckthun
Jovi De Croock
and committed by
GitHub
8b72ff31 b80fc557

+9 -4
+9 -4
scripts/rollup/settings.mjs
··· 41 41 if (pkg.optionalDependencies) 42 42 externalModules.push(...Object.keys(pkg.optionalDependencies)); 43 43 44 + const prodDependencies = new Set([ 45 + ...Object.keys(pkg.peerDependencies || {}), 46 + ...Object.keys(pkg.dependencies || {}), 47 + ]); 48 + 44 49 const externalPredicate = new RegExp(`^(${externalModules.join('|')})($|/)`); 45 50 46 51 export const isExternal = id => { ··· 49 54 return externalPredicate.test(id); 50 55 }; 51 56 52 - export const hasReact = externalModules.includes('react'); 53 - export const hasPreact = externalModules.includes('preact'); 54 - export const hasSvelte = externalModules.includes('svelte'); 55 - export const hasVue = externalModules.includes('vue'); 57 + export const hasReact = prodDependencies.has('react'); 58 + export const hasPreact = prodDependencies.has('preact'); 59 + export const hasSvelte = prodDependencies.has('svelte'); 60 + export const hasVue = prodDependencies.has('vue'); 56 61 export const mayReexport = hasReact || hasPreact || hasSvelte || hasVue; 57 62 export const isCI = !!process.env.CIRCLECI; 58 63 export const isAnalyze = !!process.env.ANALYZE;