scenario: use electron to package vue applications.
attempt: an .html demo is established. The session of the main process can be obtained through node, and the cookie can be obtained
<script>
var session = require("electron").remote.session;
function getCookie(name) {
session.defaultSession.cookies.get({ url: "http://www.github.com" }, function (error, cookies) {
console.log(cookies);
});
}
</script>
problem: modules that use node in vue will not be obtained, resulting in not getting cookie