Skip to content

preload.js如何设置呢? #6

Description

@woestler

preload.js如何设置呢?

webPreferences: {
      nodeIntegration: true,
      contextIsolation: true,
      devTools: process.env.NODE_ENV !== "production",
      preload: path.join(rootPath, "src/main/preload.js"),
},

在设置contextIsolation为true之后会报错
报错信息如下:

Uncaught ReferenceError: global is not defined
    at jsonp chunk loading:42:1
    at jsonp chunk loading:511:1
    at startup:6:1

求解决,谢谢

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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