Electron: jQuery is not defined

前端 未结 19 2456
我在风中等你
我在风中等你 2020-11-22 06:20

Problem: while developing using Electron, when you try to use any JS plugin that requires jQuery, the plugin doesn\'t find jQuery, even if you load in the correct path using

相关标签:
19条回答
  • 2020-11-22 07:17

    This works for me.

    <script languange="JavaScript">
         if (typeof module === 'object') {window.module = module; module = undefined;}
    </script>
    

    Things to consider:

    1) Put this in section right before </head>

    2) Include Jquery.min.js or Jquery.js right before the </body> tag

    0 讨论(0)
提交回复
热议问题