After switching from eslint-loader, our initial watch builds have slowed down substantially due to the lack of caching. Is there a way to use eslint’s cache?
Advertisement
Answer
ESLint’s node api has cache
and cacheLocation
keys in it, and setting those like
JavaScript
x
11
11
1
const ESLintPlugin = require('eslint-webpack-plugin')
2
3
module.exports = {
4
plugins: [
5
new ESLintPlugin({
6
cache: true,
7
cacheLocation
8
})
9
]
10
}
11
enables caching like eslint-webpack-loader
‘s old caching behavior.