码上敲享录 > vue.js常见问题详解 > Uncaught ReferenceError: webpackJsonp is not defined

Uncaught ReferenceError: webpackJsonp is not defined

上一章章节目录下一章 2020-07-28已有3181人阅读 评论(0)

Uncaught ReferenceError: webpackJsonp is not defined


解决方法:

这是因为公共文件必须在自己引用的js文件之前引用。

所以在build/webpack.dev.conf.js或者build/webpack.prod.conf.js中

把'manifest','vendor'加到chunks中并保证在前面模块引用的js前面,例如下面'manifest','vendor'在自定义的js模块console_index前面

new HtmlWebpackPlugin({

     favicon:"src/assets/images/favicon.ico",

     filename: 'designer/console_index.html',

     template: 'src/designer/console_index.html',

     inject: true,

     multihtmlCache: true,

     chunks: ['manifest','vendor','console_index'],

   }),


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交