From 3d4ffab2d54672c1db9c78d15a9912ebad0fb95f Mon Sep 17 00:00:00 2001 From: Eric Amodio <eamodio@gmail.com> Date: Sun, 15 Jan 2023 15:59:48 -0500 Subject: [PATCH] Adds caching for eslint - cuts watch time by 1/2 --- webpack.config.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index dceac70..d9e8f52 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -63,11 +63,9 @@ function getExtensionConfig(target, mode, env) { enabled: true, files: 'src/**/*.ts?(x)', options: { - // cache: true, - // cacheLocation: path.join( - // __dirname, - // target === 'webworker' ? '.eslintcache.browser' : '.eslintcache', - // ), + cache: true, + cacheLocation: path.join(__dirname, '.eslintcache/', target === 'webworker' ? 'browser/' : ''), + cacheStrategy: 'content', fix: mode !== 'production', overrideConfigFile: path.join( __dirname, @@ -282,7 +280,9 @@ function getWebviewsConfig(mode, env) { enabled: true, files: path.join(basePath, '**', '*.ts?(x)'), options: { - // cache: true, + cache: true, + cacheLocation: path.join(__dirname, '.eslintcache', 'webviews/'), + cacheStrategy: 'content', fix: mode !== 'production', }, },