electron / electron/forge

ForkTsCheckerWebpackPlugin - Configuration issue - not working if only in renderer config

Open
#3,512 0 comments 0 reactions 0 assignees View on GitHub
bug plugin/webpack typescript
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron/forge/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Electron Forge version

7.2.0

### Electron version

28.2.2

### Operating system

win 10

### Last known working Electron Forge version

_No response_

### Expected behavior

If ForkTsCheckerWebpackPlugin is only set in renderer webpack config, this should work for renderer files.

### Actual behavior

if ForkTsCheckerWebpackPlugin is removed from Main config, the ForkTsCheckerWebpackPlugin is not more working for renderer files.

### Steps to reproduce

Create a new app based on webpack + typescrtip + react template
* Add Strict true in the ts config
* add an unused import in the renderer.ts
* forge start.

In the default config, the electron application should open and you should see the error from ForkTsCheckerWebpackPlugin in the logs.

In you remove the main 'plugin' section, you have no erros anymore in the output.

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.