nl_tokens: Copy required polyfills from node_modules to the build directory
pl_tokens: function copyPolyfills ( pluginConfig , outputConfig ) { if ( ! pluginConfig . polyfillDynamicImports && ! pluginConfig . polyfillWebcomponents && ! pluginConfig . polyfillBabel ) { return ; } const polyfillsDir = ` ${ outputConfig . dir . replace ( '/legacy' , '' ) } ` ; mkdirp . sync ( polyfillsDir ) ; if ( pluginConfig . polyfillDynamicImports ) { copyFileSync ( path . resolve ( pathJoin ( __dirname , '../../src/dynamic-import-polyfill.js' ) ) , ` ${ polyfillsDir } ` , ) ; } if ( pluginConfig . polyfillWebcomponents ) { copyFileSync ( require . resolve ( '@webcomponents/webcomponentsjs/webcomponents-bundle.js' ) , ` ${ polyfillsDir } ` , ) ; } if ( pluginConfig . polyfillBabel ) { copyFileSync ( <mask> . resolve ( '@babel/polyfill/browser.js' ) , ` ${ polyfillsDir } ` , ) ; } }