electron-userland / electron-userland/electron-webpack

Changes are not reflected in Electron when using an external directory

Open
#380 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

* **Version**: 2.8.2

Sorry, that's already my second question.

Since I failed to use electron-webpack with Yarn Workspaces, I am using an external directory through an alias, like this:

```
resolve: {
alias: {
'@common': Path.resolve(__dirname, '../common')
}
}
```

It works, and when a change is made in the common directory, I can see that _something_ is being re-compiled by Electron:

```
[0] wait - compiling...
[0] event - compiled successfully
```

However, the Electron app itself is not refreshing, and if I force a refresh, the latest version of the app is not there. If I restart Electron completely, it works. Any idea what the problem could be?

Thanks a lot.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the shown webpack resolve.alias mapping to an external ../common directory, then compare the successful compilation log with Electron's refresh behavior. Done means changes in the external directory are visible in the running app without restarting Electron or relying on a forced refresh.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript, webpack
Domain
build-system, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.