Electron: jQuery is not defined

前端 未结 19 2729
我在风中等你
我在风中等你 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 06:54

    For this issue, Use JQuery and other js same as you are using in Web Page. However, Electron has node integration so it will not find your js objects. You have to set module = undefined until your js objects are loaded properly. See below example

    
    
    
    
        
    
    
    
    

    After importing like given, you will be able to use the JQuery and other things in electron.

提交回复
热议问题