#cannot find jQuery, after i set nodeIntegration: false, then report cannot find require function
#import jquery and bootstrap in main.js
#
Okay so if you want to use regular jquery and bootstrap, here's what needs to be done...
Add ProvidePlugin in .electron-vue/webpack.renderer.config.js around line 90
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
and in main.js...
window.jQuery = window.$ = require('jquery/dist/jquery.min')
import 'bootstrap/dist/js/bootstrap.min'
import 'bootstrap/dist/css/bootstrap.min.css'
Now I highly discourage using jQuery and Vue in the same environment because you are now using two frameworks for the same app. This not only bloats your app size, but it can also very easily lead to anti-patterns between Vue and jQuery. As an alternative you can look into something like vue-strap which takes bootstrap's JS functionalities and converts them to Vue instead of jQuery. This alternative yields better control over your data in the long run.
Even though, this 'post' is closed, I wanted to ask what alternative to jquery I can use, and if any of you can share a possible suggestion. I'll hard code all components, but I really want a lib for dom manipulation. By the way, I'm not asking for something I can google, but what lib have you used in that way (dom manipulation) with electron-vue. TY!
Most helpful comment
Okay so if you want to use regular jquery and bootstrap, here's what needs to be done...
Add ProvidePlugin in .electron-vue/webpack.renderer.config.js around line 90
and in main.js...
Now I highly discourage using jQuery and Vue in the same environment because you are now using two frameworks for the same app. This not only bloats your app size, but it can also very easily lead to anti-patterns between Vue and jQuery. As an alternative you can look into something like
vue-strapwhich takes bootstrap's JS functionalities and converts them to Vue instead of jQuery. This alternative yields better control over your data in the long run.