Cache Invalidation for changes in Dependencies (imports) #4564
-
|
So, my turbo.json looks like this (partially) My directory structure is like : While there are changes to the code in dashboard directory, the cache gets invalidated. However, if there are changes in another file (_components/login/..) the cache doesn't get invalidated for dashboard even when it does import it. Part of my webpack config (I have one for client, dashboard, etc. ) is shared below const clientConfig = {}
clientConfig.name = 'app'
clientConfig.target = 'web'
clientConfig.entry = {
//dashboard
dashboardIndex: path.join(config.dirs.path_src, 'views', 'dashboard', 'index.js'),
dashboardLeadsTemplates: path.join(config.dirs.path_src, 'views', 'dashboard', 'leads', 'templates.js'),
dashboardInventories: path.join(config.dirs.path_src, 'views', 'dashboard', 'inventories', 'index.js'),
dashboardInventoriesShow: path.join(config.dirs.path_src, 'views', 'dashboard', 'inventories', 'show.js'),
}
clientConfig.output = {
path: config.dirs.path_build_public,
filename: '[name].js',
}
clientConfig.cache = true
clientConfig.bail = false //Dont continue if errors
clientConfig.devtool = false
clientConfig.module = {
rules: [
{
test: [/\.jsx?$/, /\.tsx?$/],
exclude: /node_modules/,
loader: 'babel-loader',
options: {
presets: [
[
'@babel/preset-env',
{
modules: false,
loose: true,
useBuiltIns: 'usage',
corejs: 3,
},
],
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
'@babel/preset-typescript',
],
cacheDirectory: config.dirs.path_build_tmp,
},
}
}Is my expectation of dag based cache invalidation wrong? Or is there a way I can bust the cache when any of the imports (or imports of imports .. ) changes for the files in the input scope of the task. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I think you're looking for #2855 |
Beta Was this translation helpful? Give feedback.
I think you're looking for #2855