Currently, I am working on developing multiple electron apps and have a designated directory for storing common images and files. My goal is to include these common resources in each app during the electron-builder build process. According to the documentation, it is recommended to specify the path to the common files under the build > files key. However, despite configuring the build settings as shown below, I am facing issues:
"build":{
"files": [
"**/*",
"../common/img/*"
]
}
Here is the outline of my directory structure:
|git_folder
|-- electronapp1
|---- package.json
|-- electronapp2
|---- package.json
|-- common
|---- img
|---- js
|---- css
While accessing the common directories, I utilize HTML code like this:
<link rel="stylesheet" href="../common/css/master.css">
. This method works perfectly fine when running the apps with electron .
for debugging purposes. However, when I build the apps using electron-builder, it seems to omit the common directories, resulting in "File not found" errors in the console.