LoginSignup
1
3

More than 5 years have passed since last update.

ElectronでjQueryがundefinedになる問題への対策その2

Posted at

フォーク元: https://qiita.com/pirosikick/items/72d11a8578c5c3327069
参考: https://qiita.com/Chayata/items/be0f7f8d371039ab9fdd

node-integration: false の問題

フォーク元では、node-integration: falseが良いと書いてあるが、
これだとrequire()が使えなくなるため、ipc通信等ができなくなってしまう。

そこで、参考元に書いてあるように、
npm install --save jquery
とした上で、

index.html
const $ = require('jquery');

とすることで解決した。

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3