(name: string, content: string)
| 110 | } |
| 111 | } |
| 112 | function addFile(name: string, content: string) { |
| 113 | vfs[name] = content; |
| 114 | hashes[name] = sha1(content).substring(0, 8); |
| 115 | logger.info('+ %s-%s: %s', name, hashes[name].substring(0, 6), size(content.length)); |
| 116 | newFiles.push(name); |
| 117 | totalSize += content.length; |
| 118 | } |
| 119 | for (const m of lazyModules) { |
| 120 | const name = basename(m).split('.')[0]; |
| 121 | const { outputFiles } = await build(`window.lazyModuleResolver['${name}'](require('${relative(tmp, m).replace(/\\/g, '\\\\')}'))`); |