SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.46k stars 1.54k forks source link

GET http://localhost :9080/__ webpack_ hmr 404 (Not Found) #1078

Open cazure opened 3 years ago

cazure commented 3 years ago

Found an issue or bug with electron-vue

After using the command to create a project, execute the command to install the package normally, and let it run after debugging without modifying any code. The console in the developer tool always prompts

GET http://localhost :9080/ webpack hmr net::ERR ABORTED GET http://localhost :9080/ webpack_ hmr 404 (Not Found)

在使用命令创建项目后,正常的执行命令安装包,让后运行调试,没有修改任何代码。 开发者工具里面的console一直提示 GET http://localhost:9080/__webpack_hmr net::ERR_ABORTED GET http://localhost:9080/__webpack_hmr 404 (Not Found)

feixierman commented 3 years ago

same question! have some solutions?

cazure commented 3 years ago

Turn off the hot option of WebpackDevServer this file in .electron-vue/dev-runner.js line:67

`
const server = new WebpackDevServer(

compiler,

{

contentBase: path.join(__dirname, '../'),

quiet: true,

//hot: true,

before (app, ctx) {

app.use(hotMiddleware)

ctx.middleware.waitUntilValid(() => {

resolve()

})

}

}

)

server.listen(9080) `

colinder commented 3 years ago

I followed your advice and still get an error. Is there any other solution?

image

thestrangedev commented 2 years ago

Just uncomment this line in dev.runner.js file

app.use(hotMiddleware)