Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
paltry-pleuroma opened this issue Oct 24, 2023 · 0 comments
Open

Comments

@paltry-pleuroma
Copy link

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',
            },
          },
        ],
      },
    }),
  ],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant