unable to see request logs in webpack-dev-server

2019-03-24 07:52发布

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条回答
你好瞎i
2楼-- · 2019-03-24 08:49

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

查看更多
登录 后发表回答