import path from 'path' ; import type { Plugin } from 'rollup' ; /**
 * Modules that are polyfilled by Stencil, rather than using the default Node implementation.
 */ const modules = new Set ( [ 'crypto' , 'events' , 'fs' , 'module' , 'os' , 'path' , 'stream' , 'url' , 'util' ] ) ; param inputDir returns export function sysModulesPlugin ( inputDir ) { return { name : 'sysModulesPlugin' , param importee returns resolveId ( importee ) { if ( modules . has ( importee ) ) { return path . join ( inputDir , 'sys' , 'modules' , `${ importee }.js` ) ; } return null ; } , } ; }