Vue project cancels eslint and solves'Invalid Host header'

The vue project cancels eslint and solves the'Invalid Host header'.

  1. Resume the vue.config.js file in the root directory of the project
  2. Enter the following code:
// vue.config.js
module.exports = {
    
    
	// 取消eslint
    lintOnSave: false,
    // 不进行host地址检查
    derServer: {
    
    
		disableHostcheck: true
	}
}

Guess you like

Origin blog.csdn.net/weixin_40944062/article/details/107446052