branchseer / DeskGap

A cross-platform desktop app framework based on Node.js and the system webview
https://deskgap.com/
MIT License
1.83k stars 75 forks source link

Failing to load files in subfolders #47

Open Shadowfita opened 4 years ago

Shadowfita commented 4 years ago

I can't seem to load any javascript/css files that are in subfolders. The message for css files is: "Failed to open ms-local-stream://microsoft.win32webviewhost_cw5n1h2txyewy_4465736b4761704c6f63616c436f6e74656e74/css/main.css" and javascript files are just blank.

image

branchseer commented 4 years ago

What's your project's folder structure and what HTML file is being loaded?

Shadowfita commented 4 years ago

@patr0nus index.html in the root folder and then I have 3 folders "css", "js" and "lib". css folder contains bootstrap.min.css and main.css which all seem to load but come up with the error in the original topic with no css styling applied. js folder contains subfolders with javascript files in them which seem to be loaded but show up as empty when debugging.

Shadowfita commented 4 years ago

I tried moving main.css into the root folder from css/main.css and it started to apply styling.

image

Shadowfita commented 4 years ago

@patr0nus Just wondering how you've been going with this and if there were any updates or something I did incorrectly.

thisjt commented 4 years ago

The app's root directory for including HTML, CSS, and JS files is in the "main.js" location.

EDIT: I have observed that the files need to be where you included the HTML. If you try to go down a directory and "loadFile" that, you cannot go up one directory.