caching issue with web application developed using reactjs & webpack

后端 未结 3 591
闹比i
闹比i 2021-01-04 09:30

I am working on a web application developed using reactjs and webpack. After every deployment, we have to ask users to clear the browser cache and restart their browsers. I

3条回答
  •  独厮守ぢ
    2021-01-04 10:11

    You can use html-webpack-plugin

    plugins: [
        new HtmlWebpackPlugin({
            hash: true
        })
    ]
    

    hash: true | false if true then append a unique webpack compilation hash to all included scripts and css files. This is useful for cache busting.

提交回复
热议问题