在webpack.dev.conf.js中添加:disableHostCheck: true
 
devServer: {
 public: 'local.kingsum.biz',
 clientLogLevel: 'warning',
 historyApiFallback: true,
hot: true,
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
 
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin

watchOptions: {
poll: config.dev.poll,
},
disableHostCheck: true     加上这段
}

相关文章:

  • 2021-04-23
  • 2022-12-23
  • 2021-04-06
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2021-06-03
猜你喜欢
  • 2022-12-23
  • 2021-05-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-12-06
相关资源
相似解决方案