current position:Home>How to use webpack or configure quasar after context isolation is turned on by electron?

How to use webpack or configure quasar after context isolation is turned on by electron?

2022-04-29 16:37:57segmentfault

In the open electron After the context isolation function , The program starts and directly reports an error require is not defined.
Make sure that the object of the main process is not accessed from the rendering process , There is no custom preload script .
Whether it's original electron+vue-cli still Quasar(v1.15.21) Can't start .
stay electron+vue The following error is reported: :

stay Quasar The following error is reported: :

If the context isolation setting is turned off contextIsolation: false And everything is fine .
The suspicion is webpack Led to the problem, but as a writer for a few years java Those who have just come into contact with the front-end content do not understand this knowledge , Nor can we really determine the source of the exception .
Could you tell me how to get in electron When context isolation is turned on , Correct configuration electron+vue( No electron-vue) as well as Quasar Well ?


copyright notice
author[segmentfault],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/115/202204250946544280.html

Random recommended