From 5f6361f6db754aebe7c5281800e6d95d9b48e975 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Wed, 16 Jan 2019 17:24:36 +0000 Subject: [PATCH] fix: not use deprecated option esm in resolver --- packages/core/src/resolver.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/src/resolver.js b/packages/core/src/resolver.js index d3c605dc35..684e543df9 100644 --- a/packages/core/src/resolver.js +++ b/packages/core/src/resolver.js @@ -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)