mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
fix: not use deprecated option esm in resolver
This commit is contained in:
parent
a1782600f7
commit
5f6361f6db
@ -133,13 +133,13 @@ export default class Resolver {
|
||||
}
|
||||
|
||||
// Disable esm for ts files by default
|
||||
if (esm === undefined && /.ts$/.test(resolvedPath)) {
|
||||
esm = false
|
||||
if (useESM === undefined && /.ts$/.test(resolvedPath)) {
|
||||
useESM = false
|
||||
}
|
||||
|
||||
// Try to require
|
||||
try {
|
||||
if (esm === false) {
|
||||
if (useESM === false) {
|
||||
requiredModule = require(resolvedPath)
|
||||
} else {
|
||||
requiredModule = this.esm(resolvedPath)
|
||||
|
Loading…
Reference in New Issue
Block a user