search

Home  >  Q&A  >  body text

javascript - Using webpack-dev-server, the page cannot be accessed in 8080

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

滿天的星座滿天的星座2806 days ago526

reply all(4)I'll reply

  • 滿天的星座

    滿天的星座2017-05-19 10:31:03

    No page file

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-19 10:31:03

    Check if the contentBase in devServer is misconfigured

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

    reply
    0
  • 某草草

    某草草2017-05-19 10:31:03

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

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-19 10:31:03

    There must be no html file in the server directory

    reply
    0
  • Cancelreply