javascript - Using webpack-dev-server, the page cannot be accessed in 8080
滿天的星座
滿天的星座 2017-05-19 10:29:03
0
4
524

Used webpack-dev-server --content-base src --inline --hot

滿天的星座
滿天的星座

reply all(4)
滿天的星座

No page file

漂亮男人

Check if the contentBase in devServer is misconfigured

devServer: {
    contentBase: path.join(__dirname, ''), // '' 的时候默认访问到index.html  src和其他文件夹的时候就成了文件服务器的样子
    compress: false,
    inline: true,
    hot: true,
    port: 4000
},
某草草

It should be that there is no index.html file under your file! Under the root directory

Peter_Zhu

There must be no html file in the server directory

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template