We have checked your reported query and we suspect that you have created the spreadsheet sample by using in our build. While using on build we have created the local server, so that we have using the window.baseurl in exportSettings. We suspect that your provided code snippet looks like in our EJ1 Spreadsheet, based on this code we have updated the solution below.
We would like to inform that you can also create the own server configuration for your requirement. We have already documented for create the server configuration. Please refer the our below documentation link.