nl_tokens: Gets the output HTML as AST . Rollup might run with multiple outputs but there should be only one index . html output . Therefore we check if it wasn t already created before . If there is no index . html yet we copy over the input index . html with the original module scripts removed .
pl_tokens: function getOutputHTML ( dir ) { if ( existsSync ( ` ${ dir } ` ) ) { return readHTML ( ` ${ dir } ` ) ; } const outputHTML = readHTML ( inputIndexHTMLPath ) ; const scripts = queryAll ( outputHTML , predicates . hasTagName ( 'script' ) ) ; const moduleScripts = <mask> . filter ( script => getAttribute ( script , 'type' ) === 'module' ) ; moduleScripts . forEach ( moduleScript => { remove ( moduleScript ) ; } ) ; writeOutputHTML ( dir , outputHTML ) ; return outputHTML ; }