Vue开发服务器修改代码不更新且启动缓慢,该如何处理?
Vue开发服务器启动慢且热重载失效问题求助
这是我的第一篇帖子,还请手下留情。
我使用npm run serve启动Vue应用的开发服务器,服务器启动编译需要好几分钟。我查阅资料得知修改代码后服务器应自动重载,但实际并未生效。我是Vue和npm新手,不知道该如何处理。
终端输出
npm run serve > myapp@0.1.0 serve > vue-cli-service serve --host localhost INFO Starting development server... DONE Compiled successfully in 103891ms 3:30:58 AM App running at: - Local: http://localhost:8080/ - Network: http://localhost:8080/ Note that the development build is not optimized. To create a production build, run npm run build.
package.json 文件内容
{ "name": "myapp", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve --host localhost", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "core-js": "^3.8.3", "vue": "^3.2.13" }, "devDependencies": { "@babel/core": "^7.12.16", "@babel/eslint-parser": "^7.12.16", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-service": "~5.0.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3" }, "eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/vue3-essential", "eslint:recommended" ], "parserOptions": { "parser": "@babel/eslint-parser" }, "rules": {} }, "browserslist": [ "> 1%", "last 2 versions", "not dead", "not ie 11" ] }
我尝试过相关解决方案,但均无效。有人有解决思路吗?
更新
切换到Linux文件系统后,服务器启动速度快了很多。
内容的提问来源于stack exchange,提问作者Daniel Tjandra
相关产品推荐
相关产品推荐

