解决Electron加载带jQuery页面报错的问题

在引入js代码块儿前后



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


<script src="scripts/jquery.min.js">script>    
<script src="scripts/vendor.js">script>    


<script>if (window.module) module = window.module;script>

Benefits

  • Works for both browser and electron with the same code
  • Fixes issues for ALL 3rd-party libraries (not just jQuery) without having to specify each one
  • Script Build / Pack Friendly (i.e. Grunt / Gulp all scripts into vendor.js)
  • Does NOT require node-integration to be false

引自:解决Electron加载带jquery的项目报错问题

你可能感兴趣的:(Electron,jquery,javascript,electron)