bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.77k stars 1.32k forks source link

[question] What's the purpose/advantage of using require over import? #202

Closed bryanjhv closed 2 years ago

bryanjhv commented 4 years ago

Hi. Sorry if this is a basic question but I was looking at your code (taking it as a reference) and stumbled across this:

https://github.com/bencodezen/vue-enterprise-boilerplate/blob/890438c3b898d6ed921fd2d0e3b84f2fe7162d89/src/router/routes.js#L85

Is there any specific reason/purpose/advantage of using require there (and other parts, for example inside lazyLoadView) instead of import? AFAIK there should be no problem if they are imported using default imports at the top.

Thanks in advance!