Open Charles808 opened 1 year ago
I need this as well for similar reasons
I need it for handling another window with dynamic route in production. Or is it already possible and if it is do have any resource on it?
It's also necessary, maybe someone knows a workaround. In production mode google api prohibits url like: "app://.index.html"
@Charles808 @azwalzaman @madaghafuri @d-mashchenko The best workaround is to use a single static file (index.html) with a combined components game, just to have a good orchestration of components on a single page.
We allow running static pages as extensions of our app. These might also require https (or localhost), for certain Web APIs like mediaSources, so what we do is to just use electron serve with a separate protocol per app/extesnion and set the host to "localhost". Works like a charm: https://github.com/blib-la/captain/blob/f5d79534f0424198562f320a13a310ce7a08c460/src/electron/helpers/app-loaders.ts#L79-L125
specifically this part: https://github.com/blib-la/captain/blob/f5d79534f0424198562f320a13a310ce7a08c460/src/electron/helpers/app-loaders.ts#L117-L122
Using nextron default example, the dev app will be run on localhost, while the production will be run on "app://.index.html"
My problem is, I'm using Salesforce REST API, which only able to whitelist application using HTTPS or HTTP (only for localhost) url. Therefore, nextron app is working on dev but failed at production app because the origin is changed.
Is it possible to configure my nextron app, so at production build, it also using localhost ?