Skip to content

Commit

Permalink
fix: add prefix to dynamic imports name (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
  • Loading branch information
danielroe and pi0 authored Nov 5, 2020
1 parent b982ae2 commit eecd766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rollup/dynamic-require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit eecd766

Please sign in to comment.