1

i have a react application for which i want to modify the javascript and css bundles

which are building by the webpack every time the App is build to avoid the browser caching issue
for example right now it is like that

chunkFilename: 'static/css/[name].[contenthash:8].chunk.css'

i want to modify it to

chunkFilename: 'static/css/[name].[contenthash:8].' + Date.now().toString() + '.chunk.css'

for this i have to modify webpack default config

but also dont want to eject in my app thats why i am thinking of using craco for that

the same way i need to modify JavaScript bundles

chunkFilename: isEnvProduction
                ? 'static/js/[name].[contenthash:8].chunk.' + Date.now().toString() + '.js'
                : isEnvDevelopment && 'static/js/[name].chunk.js'

how can i do that , i could not find any documentation regarding this

jsBuddy
  • 49
  • 7

0 Answers0