vue-cli3新建脚手架;启动项目后webpack报错如何解决?

1.通过vue-cli3.0命令创建一个项目;项目目录如下

clipboard.png
添加vue.config.js配置文件;代码如下;

module.exports = {
    publicPath: "/",
    outputDir: "dist",
    assetsDir: "assets",
    indexPath: "index.html",
    filenameHashing: true,
    pages: undefined,
    lintOnSave: true,
    runtimeCompiler: false,
    transpileDependencies: [],
    productionSourceMap: false,
    crossorigin: undefined,
    integrity: false,
    devServer: {
        index: 'main.html',
        contentBase: __dirname,
        open: process.platform === 'darwin',
    },
}

启动项目后
clipboard.png
项目可以正常打开运行;但是出现的3个错误如何解决?

  1. webpack output is served from /
  2. Content not from webpack is served from E:projectvuex_demo
  3. 404s will fallback to /index.html

我尝试过改变vue.config.js配置;但是并没有解决,请问一下这个需要怎么配置?

阅读 7.1k
2 个回答
devServer: {
    index: 'main.html',
    contentBase: __dirname,
    open: process.platform === 'darwin',
}

看这里 给的是main.htm  但你目录里面似乎没有  

我能说根本就没有报错吗?那只是四个info提示而已。
图片描述

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题