When adding the tslib module to the preload script in an Electron application using the contextBridge, an error occurs indicating that tslib is not found.
Steps to Reproduce:
Create a new Electron application.
Add the following code snippet to the preload script file (e.g., main.preload.ts):
Run the Electron application and observe the error related to tslib not being found.
Expected Behavior:
The application should successfully bundle the tslib module and load it in the Electron preload script, allowing the code to run without errors.
Actual Behavior:
The application throws an error indicating that tslib is not found when attempting to run the Electron preload script.
Screenshots
Desktop (please complete the following information):
Additional Context:
I spent approximately 4 hours debugging this issue, which included reinstalling the entire project and creating a new NX workspace with a blank React app to isolate the problem. Despite installing tslib version ^2.4.1 as recommended by the nx-electron app, the error persists. I have followed all the necessary steps, and the issue seems to be specific to the interaction between nx-electron and tslib.
customWebpackConfig serve
The nx-electron plugin exhibits a behavior where the custom webpack configuration, provided through the customWebpackConfig option, successfully works for the build command but does not have any effect on the serve command. This raises uncertainty regarding whether this behavior is intended or a potential bug. Additionally, there is a question about the possibility of modifying the webpack configuration specifically for the serve command.
The current state suggests that the serve command in the nx-electron plugin might not be utilizing the custom webpack configuration, despite it being specified. This issue requires further investigation to determine the root cause and find a resolution.
Any assistance or guidance from the community in resolving this matter would be highly appreciated. <3
Bug Description:
When adding the tslib module to the preload script in an Electron application using the contextBridge, an error occurs indicating that tslib is not found.
Steps to Reproduce:
Create a new Electron application. Add the following code snippet to the preload script file (e.g., main.preload.ts):
Run the Electron application and observe the error related to tslib not being found.
Expected Behavior: The application should successfully bundle the tslib module and load it in the Electron preload script, allowing the code to run without errors.
Actual Behavior: The application throws an error indicating that tslib is not found when attempting to run the Electron preload script.
Screenshots
Desktop (please complete the following information):
Additional Context: I spent approximately 4 hours debugging this issue, which included reinstalling the entire project and creating a new NX workspace with a blank React app to isolate the problem. Despite installing
tslib
version^2.4.1
as recommended by thenx-electron
app, the error persists. I have followed all the necessary steps, and the issue seems to be specific to the interaction betweennx-electron
andtslib
.customWebpackConfig serve The
nx-electron
plugin exhibits a behavior where the custom webpack configuration, provided through thecustomWebpackConfig
option, successfully works for thebuild
command but does not have any effect on theserve
command. This raises uncertainty regarding whether this behavior is intended or a potential bug. Additionally, there is a question about the possibility of modifying the webpack configuration specifically for theserve
command.The current state suggests that the
serve
command in thenx-electron
plugin might not be utilizing the custom webpack configuration, despite it being specified. This issue requires further investigation to determine the root cause and find a resolution.Any assistance or guidance from the community in resolving this matter would be highly appreciated. <3