Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最新版本的 egg-vue-webpack-boilerplate 热更新问题 #151

Open
zakihuang opened this issue Sep 4, 2020 · 2 comments
Open

最新版本的 egg-vue-webpack-boilerplate 热更新问题 #151

zakihuang opened this issue Sep 4, 2020 · 2 comments

Comments

@zakihuang
Copy link

最新版本的 egg-vue-webpack-boilerplate 启动后,热更新 css 没有问题,修改 vue 中的 js 部分,无法更新,报错如下

index.js:121 TypeError: Cannot read property 'extend' of undefined
at eval (index.js:228)
at Object.eval [as reload] (index.js:119)
at eval (VM116 index.vue:34)
at Module../app/web/page/index/index.vue (index.js:293)
at webpack_require (runtime.js:787)
at Object.hotApply [as apply] (runtime.js:706)
at cb (webpack:///(:7001/webpack)-hot-middleware/process-update.js?:74:36)
at eval (webpack:///(:7001/webpack)-hot-middleware/process-update.js?:89:9)
eval @ index.js:121
eval @ VM207 index.vue:34
./app/web/page/index/index.vue @ index.js:293
webpack_require @ runtime.js:787

跟了下代码
文件 webpack:///./node_modules/vue-hot-reload-api/dist/index.js

var newCtor = record.Ctor.super.extend(options)

上句的 record.Ctor.super 中的 Super 找不到, 请问是什么问题?

@hubcarl
Copy link
Collaborator

hubcarl commented Sep 5, 2020

@7hihi 这个问题没有重现,npx easy clean 后再试试

@zakihuang
Copy link
Author

zakihuang commented Sep 5, 2020

可以重现的, 我这儿一直有呢,死活搞不定

有人说是这个问题 yinxin630/blog#1

在 /Users/meicai/Labs/examples/egg-vue-webpack-boilerplate/node_modules/vue-entry-loader/lib/web.js 按这种方法调整了下,倒是可以用了,但是又出现了其它问题。

这个方法试了下 npx easy clean , 不行呢

复现步骤:

1: npm run dev
2: 打开控制台,修改下 /app/web/page/index/index.vue 里 data 的 pageSize = 2
3:控制台立马变红,出了这个提示

这里评论区最下面有张图片,说的就是这个问题
https://www.yuque.com/easy-team/egg-vue/version

另外我用的是新版本的, 是不是新版本兼容性问题

"devDependencies": {
"@easy-team/easywebpack-cli": "^4.0.0",
"@easy-team/easywebpack-vue": "^4.0.0",
"babel-plugin-component": "^1.1.1",
"egg-logview": "^1.0.0",
"egg-webpack": "^4.4.1",
"egg-webpack-vue": "^2.0.0",
"eslint": "^4.19.1",
"eslint-config-egg": "^5.0.0",
"eslint-plugin-html": "^6.0.2",
"eslint-plugin-vue": "^4.7.1",
"husky": "^4.2.5",
"ip": "^1.1.5",
"lint-staged": "^10.2.2",
"raw-loader": "^3.0.0"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants