const path = require('path'); const html = require('choo/html'); const NAME = 'AndroidIndexPlugin'; function chunkFileNames(compilation) { const names = {}; for (const chunk of compilation.chunks) { for (const file of chunk.files) { if (!/\.map$/.test(file)) { names[`${chunk.name}${path.extname(file)}`] = file; } } } return names; } class AndroidIndexPlugin { apply(compiler) { compiler.hooks.emit.tap(NAME, compilation => { const files = chunkFileNames(compilation); const page = html`