{"action":"closed","issue":{"url":"https://api.github.com/repos/nklayman/vue-cli-plugin-electron-builder/issues/63","repository_url":"https://api.github.com/repos/nklayman/vue-cli-plugin-electron-builder","labels_url":"https://api.github.com/repos/nklayman/vue-cli-plugin-electron-builder/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/nklayman/vue-cli-plugin-electron-builder/issues/63/comments","events_url":"https://api.github.com/repos/nklayman/vue-cli-plugin-electron-builder/issues/63/events","html_url":"https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/63","id":355183370,"node_id":"MDU6SXNzdWUzNTUxODMzNzA=","number":63,"title":"How to run an external web app in a new electron window?","user":{"login":"ismet","id":109025,"node_id":"MDQ6VXNlcjEwOTAyNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/109025?v=4","gravatar_id":"","url":"https://api.github.com/users/ismet","html_url":"https://github.com/ismet","followers_url":"https://api.github.com/users/ismet/followers","following_url":"https://api.github.com/users/ismet/following{/other_user}","gists_url":"https://api.github.com/users/ismet/gists{/gist_id}","starred_url":"https://api.github.com/users/ismet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ismet/subscriptions","organizations_url":"https://api.github.com/users/ismet/orgs","repos_url":"https://api.github.com/users/ismet/repos","events_url":"https://api.github.com/users/ismet/events{/privacy}","received_events_url":"https://api.github.com/users/ismet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-29T14:18:50Z","updated_at":"2018-09-08T03:06:31Z","closed_at":"2018-09-08T03:06:31Z","author_association":"NONE","body":"Hi,\r\n\r\nHere is my scenario:\r\n\r\nI have a standard vue-cli app with vue-cli-plugin-electron builder installed. Both web and electron versions work like a charm.\r\n\r\nI have a link in a page. This link is supposed to open another web app built with webpack in a new electron window.\r\n\r\nUnder `/public`, I created a subfolder called `demo` to include that web app.\r\nThe demo folder contents:\r\n![image](https://user-images.githubusercontent.com/109025/44793004-e71e1380-abad-11e8-98c1-b5cc585066f7.png)\r\n\r\nThe Vue component:\r\n```vue\r\n<html>\r\n  <div>\r\n    <a @click=\"openExternalWebApp()\">Open External Demo App In New Electron Window</a>\r\n  </div>\r\n</html>\r\n<script>\r\nimport { remote } from 'electron'\r\nexport default {\r\n  methods: {\r\n    openExternalWebApp() {\r\n      let demoWindow = new remote.BrowserWindow({ \r\n        show: false, \r\n        width: 1440,\r\n        height: 900,\r\n        webPreferences: { plugins: true }\r\n      })\r\n\r\n      demoWindow.loadURL(`${__static}\\\\demo\\\\index.html`)\r\n        \r\n      demoWindow.once('ready-to-show', () => {\r\n        demoWindow.show()\r\n      })\r\n    }\r\n  }\r\n}\r\n</script>\r\n```\r\n\r\nThis code opens the new window. However it doesn't load the external web app properly, since that app is not a static web app (cannot be opened by clicking index.html), but a dynamic web app built with webpack. So, we need to have some webserver or something else to open it.\r\n\r\nHow can I make this electron app load the external web app in a new window? Any suggestions?\r\n"}}
{"actor":{"display_login":"nklayman"}}