text: const path = require("path");
  
  module.exports = ({ config }) => {
    config.resolve.alias = {
      ...config.resolve.alias,
      src: path.resolve(__dirname, "../src"),
    };
  
    // remove svg from existing rule
    config.module.rules = config.module.rules.map((rule) => {
      if (
        String(rule.test) ===
        String(
          /\.(svg|ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/
        )
      ) {
        return {
          ...rule,
          test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|cur|ani)(\?.*)?$/,
        };
      }
  
      return rule;
    });
  
    // use svgr for svg files
    config.module.rules.unshift({
      test: /\.svg$/,
      use: ["@svgr/webpack", "url-loader"],
    });
  
    return config;
  };
  