unable to see request logs in webpack-dev-server

冷暖自知 提交于 2020-01-12 06:35:42

问题


I am using webpack-dev-server to act as a CDN server locally to serve various static assets like css, js, html etc.

Everything runs fine but for debugging purposes, I am unable to see the requests received by the CDN server.

webpack-dev-server just goes silent and doesn't show any info/errors once it has compiled the bundle of static assets.

I went through the command line help too but with no success.


回答1:


Basically, webpack-dev-server uses express to spawn a webserver. To enable seeing logs, one needs to set DEBUG environment variable as required by express

export DEBUG='express:*'

This started showing me logs of various requests received by webpack-dev-server



来源:https://stackoverflow.com/questions/41822032/unable-to-see-request-logs-in-webpack-dev-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!