Electron Path coexist Harmoniously with Website Path?

I am pretty new to electron and have so far been impressed with what it has to offer. My current task is to package a webapp as an electron app. I’ve been having some success, but have currently gotten hung up on reading files in my project’s assets folder. In particular, depending on how I write my electron main.js the application can either read font files OR an xlsx file we are using to store data, but not both.

The research I’ve done so far indicates the community has very strong opinions about ‘electron’ path and ‘website’ path. I think if I become knowledgeable enough I ought to be able to get the fonts I need and the xlsx data I want in a single project. I’ll describe my problem below and would be grateful for suggestions.

Alternatively, if there is some specific set of documentation or knowledge base that might help me figure this out I would really appreciate a heads up.

Here is the code that pulls the data from the assets folder into the website:
SimpleXL.load("/assets/data/List.xlsx", printJSON);

The electron app can read the xlsx data if I remove the first “/”. Here is the electron code from main.js:

    pathname:path.join(__dirname, 'dist/index.html'),
slashes: true

This approach works to pull in the xls data from the website, only none of the fonts or other data is pulled in correctly.

Following the approach outlined here I was able to create a version of an electron app that pulled in fonts flawlessly, only now the xlsx file path is no longer good.

When loading the xlsx file the ‘interceptFileProtocol’ method does intercept the call and changes the url to:
Which is correct, however, in the electron app the error is:
main.bundle.js?92b99b2442c75f3217f1:8 GET file:///assets/data/List.xlsx net::ERR_FILE_NOT_FOUND

It appears Electron is ignoring the intercept and using the path straight from the code.

Any guidance would be appreciated. Let me know if there is anything I can do to make it easier to be helped.

Thank you!