0

i'm facing with this error when i deploy to production ..

console error

this is my craco.config.js

const webpack = require("webpack");
const BundleAnalyzerPlugin =
  require("webpack-bundle-analyzer").BundleAnalyzerPlugin;

module.exports = function ({ env }) {
  const isProductionBuild = process.env.NODE_ENV === "production";
  const analyzerMode = process.env.REACT_APP_INTERACTIVE_ANALYZE
    ? "server"
    : "json";

  const plugins = [];

  if (isProductionBuild) {
    plugins.push(new BundleAnalyzerPlugin({ analyzerMode }));
  }

  return {
    webpack: {
      plugins,
      cache: {
        type: "filesystem",
        cacheDirectory: "node_modules/.cache/craco",
        buildDependencies: {
          config: [__filename],
        },
      },
    },
  };
};

i tried all the options i found so far.. but i couldnt find any solution .. anyone have maybe something that work?

i tried to disable the cache of the browser but i couldnt make it work...

aviva
  • 1
  • 1

0 Answers0