Webpack-dev-server serves a directory list instead of the app page

后端 未结 4 1646
-上瘾入骨i
-上瘾入骨i 2021-01-30 15:53

I can only see the actual app under /public.

The configs in webpack.config.js are below:

var path    = require(\'path\         


        
4条回答
  •  北恋
    北恋 (楼主)
    2021-01-30 16:14

    You can also add the --content-base flag to your start-up script, e.g.

        "scripts": {
            "start:dev": "webpack-dev-server --inline --content-base ./public"
        }
    

提交回复
热议问题