text: const path = require("path");
  
  module.exports = function override(config) {
    config.experiments = {
      asyncWebAssembly: true,
    };
  
    console.log(config);
  
    config.module.rules.push({
      test: /\.mjs$/,
      include: /node_modules/,
      type: "javascript/auto",
    });
  
    const wasmExtensionRegExp = /\.wasm$/;
  
    config.resolve.extensions.push(".wasm");
  
    config.module.rules.forEach((rule) => {
      (rule.oneOf || []).forEach((oneOf) => {
        if (oneOf.loader && oneOf.loader.indexOf("file-loader") >= 0) {
          // make file-loader ignore WASM files
          oneOf.exclude.push(wasmExtensionRegExp);
        }
      });
    });
  
    // add a dedicated loader for WASM
    config.module.rules.push({
      test: wasmExtensionRegExp,
      include: path.resolve(__dirname, "src"),
      use: [{ loader: require.resolve("wasm-loader"), options: {} }],
    });
  
    return config;
  };
  