1

I'm using React JS and when I build my app to deploy, I use react-scripts as follow below:

react-scripts build

And my chunk files are something like:

0.cebdafcf.chunk.js
1.fa48de00.chunk.js
2.98b9bea7.chunk.js
...
52.9ca2408d.chunk.js
App.7b21e172.chunk.js
dashboards.f6142b89.chunk.js
user-forgot-password.06d87a22.chunk.js
views.16dc12b2.chunk.js
...

But every time I build, the hash suffix are the same, for example, I'd like every build change the hash for App..chunk.js Is there any way to do it?

I've tried the option described here: Github Renamer Answer, using the lib renamer, but it didn't work to update the hash name for all chunk files.

Thank you in advance for helping

1 Answer 1

2

What I've done to solve was: First of all, I had to eject react so on this way I had access to change the webpack.config and after I've changed on webpack.config everything with

[contenthash:8]

to

[contenthash]

So, on this way, everytime we have a change on the file, the hash config chunk will be different. And for me, it's enough.

I don't know if someone has another solution, better or simpler. If yes, post to help other people.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.