NodeJS native require() should work in root of index.html
Describe the problem
[REQUIRED] Actual Behavior
require() not a defined function
[REQUIRED] Steps to reproduce the behavior
npm run start, open dev inspection, view console
[REQUIRED] Environment
AppAuth-JS version: current version as of 8.15.2021
AppAuth-JS Environment (Node, Browser (UserAgent), ...): Electron 12.0.2
Source code snippts (inline or JSBin)
Fix is applied to index.ts by making the following change starting on line 27
w = new BrowserWindow(
{
width: 1280, height: 720, icon: 'assets/app_icon.png',
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
});
Expected Behavior
[REQUIRED] Describe expected behavior
NodeJS native require() should work in root of index.html
Describe the problem
[REQUIRED] Actual Behavior
require() not a defined function
[REQUIRED] Steps to reproduce the behavior
npm run start, open dev inspection, view console
[REQUIRED] Environment
Fix is applied to index.ts by making the following change starting on line 27 w = new BrowserWindow( { width: 1280, height: 720, icon: 'assets/app_icon.png', webPreferences: { nodeIntegration: true, contextIsolation: false, } });