1. 程式人生 > >vue-cli 解決Invalid Host header

vue-cli 解決Invalid Host header

pack ali pen head pre over isa ets pos

在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 加上這段 }

vue-cli 解決Invalid Host header