MCPcopy Index your code
hub / github.com/electron/forge / devServerOptions

Method devServerOptions

packages/plugin/webpack/src/WebpackPlugin.ts:766–789  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

764 };
765
766 devServerOptions(): WebpackDevServer.Configuration {
767 const cspDirectives =
768 this.config.devContentSecurityPolicy ??
769 "default-src 'self' 'unsafe-inline' data:; script-src 'self' 'unsafe-eval' 'unsafe-inline' data:";
770
771 const defaults: Partial<WebpackDevServer.Configuration> = {
772 hot: true,
773 devMiddleware: {
774 writeToDisk: true,
775 },
776 historyApiFallback: true,
777 };
778 const overrides: Partial<WebpackDevServer.Configuration> = {
779 port: this.port,
780 setupExitSignals: true,
781 static: path.resolve(this.baseDir, 'renderer'),
782 headers: {
783 ...this.config.devServer?.headers,
784 'Content-Security-Policy': cspDirectives,
785 },
786 };
787
788 return merge(defaults, this.config.devServer ?? {}, overrides);
789 }
790
791 private alreadyStarted = false;
792}

Callers 2

WebpackPluginClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected