You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the library with vite, vite raises 3 warnings about the use of the eval method
use:
import*aslibfrom"google-libphonenumber";
warnings (Use of eval in "..." is strongly discouraged as it poses security risks and may cause issues with minification):
node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js (38:206): Use of eval in "node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js (40:350): Use of eval in "node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js" is strongly discouraged as it poses security risks and may cause issues with minification.
node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js (56:475): Use of eval in "node_modules/.pnpm/google-libphonenumber@3.2.40/node_modules/google-libphonenumber/dist/libphonenumber.js" is strongly discouraged as it poses security risks and may cause issues with minification.
Here are the 3 lines:
goog.ASSUME_ES_MODULES_TRANSPILED=!1;goog.TRANSPILE_TO_LANGUAGE="";goog.TRANSPILER="transpile.js";goog.hasBadLetScoping=null;goog.useSafari10Workaround=function(){if(null==goog.hasBadLetScoping){try{vara=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(b){a=!1}goog.hasBadLetScoping=a}returngoog.hasBadLetScoping};goog.workaroundSafari10EvalBug=function(a){return"(function(){"+a+"\n;})();\n"};goog.constructNamespace_(e,d,c!==d):goog.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeofd&&null!=d&&Object.seal(d),goog.loadedModules_[e]={exports:d,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName};elsethrowError('Invalid module name "'+e+'"');}finally{goog.moduleLoaderState_=b}};goog.loadModuleFromSource_=function(a,b){eval(b);returna};a=b?[b]:a.getElementsByTagName("SCRIPT");for(b=a.length-1;0<=b;--b){varc=a[b].src,d=c.lastIndexOf("?");d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}}},goog.findBasePath_(),goog.Transpiler=function(){this.requiresTranspilation_=null;this.transpilationTarget_=goog.TRANSPILE_TO_LANGUAGE},goog.Transpiler.prototype.createRequiresTranspilation_=function(){functiona(g,h){e?d[g]=!0:h()?(c=g,d[g]=!1):e=d[g]=!0}functionb(g){try{return!!eval(g)}catch(h){return!1}}
These warnings seem to originate from the goog library but I cannot see it in the dependency tree of google-libphonenumber.
Do you have any idea of where that originates from?
The text was updated successfully, but these errors were encountered:
When using the library with vite, vite raises 3 warnings about the use of the
eval
methoduse:
warnings (Use of eval in "..." is strongly discouraged as it poses security risks and may cause issues with minification):
Here are the 3 lines:
These warnings seem to originate from the goog library but I cannot see it in the dependency tree of google-libphonenumber.
Do you have any idea of where that originates from?
The text was updated successfully, but these errors were encountered: