nl_tokens: Browsers which don t support es modules also don t support es2015 and web components for those browsers we load a systemjs build including : - es5 code - babel polyfills - web component polyfills ( no feature detection needed ) - systemjs loader for modules
pl_tokens: function writeLegacyModules ( pluginConfig , outputConfig , entryModules ) { const legacyOutputDir = outputConfig . dir ; const outputDir = legacyOutputDir . replace ( '/legacy' , '' ) ; const indexHTML = getOutputHTML ( outputDir ) ; const body = query ( indexHTML , predicates . hasTagName ( 'body' ) ) ; const polyfillsDir = ` ${ outputDir } ` ; mkdirp . sync ( polyfillsDir ) ; if ( pluginConfig . polyfillBabel ) { append ( body , createScript ( { src : ` ` , nomodule : '' , } ) , ) ; } if ( pluginConfig . polyfillWebcomponents ) { append ( body , createScript ( { src : ` ` , nomodule : '' , } ) , ) ; } copyFileSync ( require . resolve ( 'systemjs/dist/s.min.js' ) , ` ${ polyfillsDir } ` ) ; <mask> ( body , createScript ( { src : ` ` , nomodule : '' , } ) , ) ; const loadScript = createScript ( { nomodule : '' } , entryModules . map ( src => ` ${ pathJoin ( 'legacy' , src ) } ` ) . join ( '' ) , ) ; append ( body , loadScript ) ; writeOutputHTML ( outputDir , indexHTML ) ; }