Skip to content

Commit

Permalink
fix: correctly get packages version to generate cache config
Browse files Browse the repository at this point in the history
  • Loading branch information
Djaler committed Mar 26, 2021
1 parent aed7200 commit f2574c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function configureJs(jsRule: Config.Rule<Config.Module>, 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
Expand All @@ -53,9 +53,9 @@ function configureTs(tsRule: Config.Rule<Config.Module>, 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
Expand Down

0 comments on commit f2574c4

Please sign in to comment.