Build: Enable persistent cache for faster Webpack builds (#41430)

* build(webpack): enable caching for development and production builds

* build(webpack): introduce unminified production build script

* build(typescript): introduce incremental flag to cache typechecking

* chore(git): ignore typescript cache file

* chore(webpack): bump dependencies to latest
This commit is contained in:
Jack Westbrook
2021-11-11 14:32:34 +01:00
committed by GitHub
parent 5cc9ff8b28
commit 5fad5511e9
6 changed files with 302 additions and 175 deletions

View File

@ -59,6 +59,15 @@ module.exports = (env = {}) =>
splitChunks: false,
},
// enable persistent cache for faster cold starts
cache: {
type: 'filesystem',
name: 'grafana-default-development',
buildDependencies: {
config: [__filename],
},
},
plugins: [
parseInt(env.noTsCheck, 10)
? new DefinePlugin({}) // bogus plugin to satisfy webpack API