跳到主内容

webpack Cannot destructure property compile of 'undefined' or 'null'

· 1分钟阅读

问题

Cannot destructure property compile of ‘undefined’ or ‘null’.

原因

由于 webpack 版本与 webpack-dev-server 版本不对应导致的

解决

更新成一致版本即可

webpack 版本 4.x(3.x) 版本需要 webpack-dev-server 3.x(2.x) 版本