Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This will broke webpack cache when the value be repleaced is dynamic #86

Open
Shangyunliang opened this issue May 19, 2023 · 4 comments

Comments

@Shangyunliang
Copy link

dose anyone have some idea to resolve this ?

@artembatura
Copy link
Owner

Hi! Last versions shouldn't broke webpack cache. Which version of plugin do you use?

@Shangyunliang
Copy link
Author

Shangyunliang commented May 19, 2023

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

@artembatura
Copy link
Owner

When commit hash is changed, then you running build again but result doesn't change?

@Shangyunliang
Copy link
Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants