fix: add prefix to dynamic imports name (#5)

Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
Daniel Roe 2020-11-05 12:28:40 +00:00 committed by GitHub
parent dfdd466270
commit d4624abfb9

View File

@ -49,7 +49,7 @@ export default function dynamicRequire ({ dir, globbyOptions, outDir, chunksDir
const imports = files.map(id => ({
id,
import: resolve(dir, id),
name: id.replace(/[\\/.]/g, '_')
name: '_' + id.replace(/[\\/.]/g, '_')
}))
if (!outDir) {