From f2574c4eb90f2467cd52c1f2d598dd3c486759c2 Mon Sep 17 00:00:00 2001 From: Kirill Romanov Date: Fri, 26 Mar 2021 12:19:36 +0300 Subject: [PATCH] fix: correctly get packages version to generate cache config --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 94c611f..edf391a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,7 +32,7 @@ function configureJs(jsRule: Config.Rule, api: PluginAPI, target: .loader(require.resolve('cache-loader')) .options(api.genCacheConfig('js-esbuild-loader', { target, - esbuildLoaderVersion: require('esbuild-loader/package.json'), + esbuildLoaderVersion: require('esbuild-loader/package.json').version, })); jsRule @@ -53,9 +53,9 @@ function configureTs(tsRule: Config.Rule, api: PluginAPI, target: .loader(require.resolve('cache-loader')) .options(api.genCacheConfig('ts-esbuild-loader', { target, - esbuildLoaderVersion: require('esbuild-loader/package.json'), + esbuildLoaderVersion: require('esbuild-loader/package.json').version, // eslint-disable-next-line import/no-extraneous-dependencies - typescriptVersion: require('typescript/package.json'), + typescriptVersion: require('typescript/package.json').version, }, 'tsconfig.json')); tsRule