mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
refactor: load all modules with esm (#3556)
This commit is contained in:
parent
8c85f2299e
commit
31d25df332
@ -112,9 +112,7 @@ export default class ModuleContainer {
|
|||||||
|
|
||||||
// Resolve handler
|
// Resolve handler
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
// If module is internal (src starts with '.' or alias '@' '~'), support esm
|
handler = this.nuxt.requireModule(src)
|
||||||
const isInnerModule = /^[.@~]/.test(src)
|
|
||||||
handler = this.nuxt.requireModule(src, { esm: isInnerModule })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate handler
|
// Validate handler
|
||||||
|
Loading…
Reference in New Issue
Block a user