About webpack Packaging Tip Template execution failed: 'xxx' is not defined

(it is too troublesome to repeat the problem due to requirements and other reasons) here is what kind of effect I want to achieve:

  created () {
    console.log(userInfo)
  }

if the userInfo here has not been defined, I want to print out the error report of null or undefined, instead of webpack. I hope the god can tell me what I need to configure in webpack or what to configure in eslint

Apr.25,2021

using undefined variables directly in js is bound to report an error. It is impossible to understand what requirement must be written in this way.
if it is a global variable, you can use console.log (window.userInfo) , but with this requirement, I think there must be a logical problem

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bfd0-44e78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bfd0-44e78.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?