1. /**
    
  2.  * Copyright (c) Meta Platforms, Inc. and affiliates.
    
  3.  *
    
  4.  * This source code is licensed under the MIT license found in the
    
  5.  * LICENSE file in the root directory of this source tree.
    
  6.  *
    
  7.  */
    
  8. 
    
  9. // Do not require this module directly! Use normal `invariant` calls with
    
  10. // template literal strings. The messages will be replaced with error codes
    
  11. // during build.
    
  12. 
    
  13. function formatProdErrorMessage(code) {
    
  14.   let url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
    
  15.   for (let i = 1; i < arguments.length; i++) {
    
  16.     url += '&args[]=' + encodeURIComponent(arguments[i]);
    
  17.   }
    
  18.   return (
    
  19.     `Minified React error #${code}; visit ${url} for the full message or ` +
    
  20.     'use the non-minified dev environment for full errors and additional ' +
    
  21.     'helpful warnings.'
    
  22.   );
    
  23. }
    
  24. 
    
  25. export default formatProdErrorMessage;