refactor: load all modules with esm (#3556)

This commit is contained in:
Clark Du 2018-07-30 17:05:42 +01:00 committed by Sébastien Chopin
parent 8c85f2299e
commit 31d25df332

View File

@ -112,9 +112,7 @@ export default class ModuleContainer {
// Resolve handler
if (!handler) {
// If module is internal (src starts with '.' or alias '@' '~'), support esm
const isInnerModule = /^[.@~]/.test(src)
handler = this.nuxt.requireModule(src, { esm: isInnerModule })
handler = this.nuxt.requireModule(src)
}
// Validate handler