From d855109d5dbac0ff9c3ac54bdfb19f2a3dba4179 Mon Sep 17 00:00:00 2001 From: Or Kaplan Date: Mon, 16 Dec 2019 00:46:24 +0200 Subject: [PATCH] Since node 12.3.0 require.resolve requires options.paths to a list --- plugin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/index.js b/plugin/index.js index 8a4332a..24ff290 100644 --- a/plugin/index.js +++ b/plugin/index.js @@ -33,7 +33,7 @@ export default ({ types: t, template }) => ({ // Find the file, using node resolution/NODE_PATH if necessary. const fallbackPaths = opts.nodePath ? opts.nodePath.split(delimiter) - : process.env.NODE_PATH + : [process.env.NODE_PATH] let absPath = resolve(importPath, jsFilename) if (!existsSync(absPath)) absPath = require.resolve(importPath, { paths: fallbackPaths })