webpackJsonp is not defined: webpack-dev-server and CommonsChunkPlugin

≯℡__Kan透↙ 提交于 2019-12-05 05:14:57

In your index.html file just call vendor.bundle.js before bundle.js

<script src="assets/js/vendor.bundle.js"></script>
<script src="assets/js/bundle.js"></script>

That's all, now it should work. More information.

Rename vendor entry point to

'vendor.js': ['lodash']

Just to expand a little on the concept, the vendor has to come first since the runtime is contained in there (everything that defines all the variables and methods run during client load time because of all the webpacking).

If you use a manifest file (because of chunking and so on), you'll have to put that first since it will then contain the runtime because of the way the module is built.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!