modify-source-webpack-plugin
modify-source-webpack-plugin copied to clipboard
This will broke webpack cache when the value be repleaced is dynamic
dose anyone have some idea to resolve this ?
Hi! Last versions shouldn't broke webpack cache. Which version of plugin do you use?
new ModifySourcePlugin({
rules: [
{
test: /App.tsx$/,
operations: [new ReplaceOperation("all", "GIT_VERSION", Current_Git_Version)],
}
]
})
i use the lastest version like this, but Current_Git_Version is change when git commit is change, when the commitid is changed. the cache will be broke. i think maybe the git version change will broke cache. do you have some idea to replace the 'GIT_VERSION' string with dynamic value but do not rebuild, only replace the value in chunk
When commit hash is changed, then you running build again but result doesn't change?
@artembatura the result is been replaced. but the process is broke the cache that make webpack will rebuild all module. have any idea to change the result but do not make webpack rebuild all module?