<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: athul dominic</title>
    <description>The latest articles on DEV Community by athul dominic (@athuldom).</description>
    <link>https://dev.to/athuldom</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1077680%2Fe91f3c67-8b8a-42ea-9497-861d1ac8a4c2.png</url>
      <title>DEV Community: athul dominic</title>
      <link>https://dev.to/athuldom</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/athuldom"/>
    <language>en</language>
    <item>
      <title>React cache issue in new build</title>
      <dc:creator>athul dominic</dc:creator>
      <pubDate>Mon, 24 Jul 2023 05:52:47 +0000</pubDate>
      <link>https://dev.to/athuldom/react-cache-issue-in-new-build-1c3f</link>
      <guid>https://dev.to/athuldom/react-cache-issue-in-new-build-1c3f</guid>
      <description>&lt;p&gt;When a new build is deployed, some of the older code is updating due to cache (or some other unknown) issue. i have configured the webpack.config.js file as below by referring the internet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const path = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");

module.exports = {
  entry: "./src/index.js",
  output: {
    path: path.resolve(__dirname, "dist"),
    filename: "[name].[contenthash].js",
    publicPath: "/",
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        use: "babel-loader",
      },
      {
        test: /\.css$/,
        use: [MiniCssExtractPlugin.loader, "css-loader"],
      },
      // Add any additional loaders for other file types
    ],
  },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].[contenthash].css",
    }),
    // Add any other plugins you need
  ],
  // Add any necessary optimizations or other configuration options
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;index.html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;!-- adding for cache issues --&amp;gt;
    &amp;lt;meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /&amp;gt;
    &amp;lt;meta http-equiv="Pragma" content="no-cache" /&amp;gt;
    &amp;lt;meta http-equiv="Expires" content="0" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kindly help with any correction to the above code, or any new other alternative solutions.&lt;br&gt;
This is a urgent requirement&lt;/p&gt;

</description>
      <category>react</category>
      <category>webpack</category>
      <category>help</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
