mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 01:53:55 +00:00
fix: add prefix to dynamic imports name (#5)
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
This commit is contained in:
parent
dfdd466270
commit
d4624abfb9
@ -49,7 +49,7 @@ export default function dynamicRequire ({ dir, globbyOptions, outDir, chunksDir
|
|||||||
const imports = files.map(id => ({
|
const imports = files.map(id => ({
|
||||||
id,
|
id,
|
||||||
import: resolve(dir, id),
|
import: resolve(dir, id),
|
||||||
name: id.replace(/[\\/.]/g, '_')
|
name: '_' + id.replace(/[\\/.]/g, '_')
|
||||||
}))
|
}))
|
||||||
|
|
||||||
if (!outDir) {
|
if (!outDir) {
|
||||||
|
Loading…
Reference in New Issue
Block a user