Skip to content

contextIsolation is not an option of config's renderer property #149

@paltry-pleuroma

Description

@paltry-pleuroma

The docs use a different format than the template to define the webpack plugin. When using the WebpackPlugin constructor, the contextIsolation option is not available and the docs state it must be set in addition to the BrowserWindow webPreferences.

const config: ForgeConfig = {
  makers: [new MakerDeb({}), new MakerRpm({}), new MakerSquirrel({}), new MakerZIP({}, ['darwin'])],
  plugins: [
    new WebpackPlugin({
      mainConfig,
      renderer: {
        config: rendererConfig,
        contextIsolation: true, // 👈 this is a TS error
        entryPoints: [
          {
            html: './frontend/public/index.html',
            js: './frontend/src/index.tsx',
            name: 'main_window',
            preload: {
              config: preloadConfig,
              js: './electron/src/preload.ts',
            },
          },
        ],
      },
    }),
  ],
};

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