Skip to content

New webPreferences settings for node integration #3

Description

@Marxsal

Apparently there have been changes in the recent versions of node, so that webPreferences now needs to be:

 webPreferences: { 
       nodeIntegration: true,
        contextIsolation: false,
        enableRemoteModule: true }

Without this, attempts to use "require" (and probably other bits of the node api) in the browser will fail with message "Uncaught ReferenceError: require is not defined".
(Node 14+)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions