标签:ack 通过 问题 llb 需要 color targe test install
需要webpack,webpack-dev-server
npm install webapck webpack-dev-server --save-dev
设置时
devServer: { historyApiFallback: true, hot: true, inline: true, stats: { colors: true }, proxy: { ‘/list‘: { target: ‘https://api.github.com‘, pathRewrite: {‘^/column‘ : ‘/column‘}, changeOrigin: true } } },
这段代码就是将 ‘/list‘ 通过本地开发服务器webpack-dev-server转发到 ‘https://api.github.com‘
项目地址:https://github.com/fengnovo/diary/tree/master/react/20161021/webpack-dev-server-proxy-test
用webpack-dev-server开发时代理,决解开发时跨域问题
标签:ack 通过 问题 llb 需要 color targe test install
原文地址:http://www.cnblogs.com/fengnovo/p/5983638.html