{"record":{"id":"04bd842be251943b","repo":"facebook/react","slug":"todo-implement-the-server-compiler","errorCode":null,"errorMessage":"TODO: Implement the server compiler.","messagePattern":"TODO: Implement the server compiler\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js","lineNumber":79,"sourceCode":"  serverConsumerManifestFilename?: string,\n};\n\nconst PLUGIN_NAME = 'React Server Plugin';\n\nexport default class ReactFlightWebpackPlugin {\n  clientReferences: $ReadOnlyArray<ClientReferencePath>;\n  chunkName: string;\n  clientManifestFilename: string;\n  serverConsumerManifestFilename: string;\n\n  constructor(options: Options) {\n    if (!options || typeof options.isServer !== 'boolean') {\n      throw new Error(\n        PLUGIN_NAME + ': You must specify the isServer option as a boolean.',\n      );\n    }\n    if (options.isServer) {\n      throw new Error('TODO: Implement the server compiler.');\n    }\n    if (!options.clientReferences) {\n      this.clientReferences = [\n        {\n          directory: '.',\n          recursive: true,\n          include: /\\.(js|ts|jsx|tsx)$/,\n        },\n      ];\n    } else if (\n      typeof options.clientReferences === 'string' ||\n      !isArray(options.clientReferences)\n    ) {\n      this.clientReferences = [options.clientReferences as $FlowFixMe];\n    } else {\n      // $FlowFixMe[incompatible-type] found when upgrading Flow\n      this.clientReferences = options.clientReferences;\n    }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/facebook/react/blob/eafeac097ba51e1eab809c07102126bd5f8e5425/packages/react-server-dom-webpack/src/ReactFlightWebpackPlugin.js#L61-L97","documentation":"The webpack plugin's constructor accepts isServer as a boolean but only the false path (client reference + manifest compilation) is implemented; passing isServer: true immediately throws 'TODO: Implement the server compiler.' The server side of the RSC pipeline is handled by the node loader/register at runtime, not by this plugin pass.","triggerScenarios":"new ReactFlightWebpackPlugin({isServer: true, ...}) — any attempt to make the plugin emit server artifacts.","commonSituations":"Assuming options must mirror each other for client and server webpack builds | Following architecture docs that describe a server compiler pass that has no implementation yet | Copy-pasting a config template with isServer gated on an env var","solutions":["Set isServer: false; the server bundle does not need this plugin","Produce the server side via the runtime loader (react-server-dom-webpack/node-loader in module.rules or --loader) plus the generated client manifest","Track upstream for server-compiler support instead of working around the throw"],"exampleFix":"// before\nnew ReactFlightWebpackPlugin({isServer: process.env.NODE_ENV !== 'browser', ...})\n\n// after (client webpack config only)\nnew ReactFlightWebpackPlugin({isServer: false, clientReferences: [...]})\n// server bundle: no plugin; add the node loader to module.rules instead","handlingStrategy":"validation","validationCode":"const SUPPORTED = new Set(['isServer:false']);\nif (options?.isServer === true) {\n  throw new Error('server compiler pass is not implemented; use the node loader for the server bundle');\n}","typeGuard":"function isSupportedPluginOptions(o) {\n  return o == null || o.isServer !== true; // only the client pass exists\n}","tryCatchPattern":null,"preventionTips":["Only instantiate the plugin in the client webpack config","Gate the plugin on an explicit isClient flag, not an env-derived boolean","Watch upstream release notes for the server compiler before enabling isServer: true"],"tags":["webpack","plugin","not-implemented","react-server-components"],"backgroundTag":"unsupported-plugin-option","analyzedSha":"eafeac097ba51e1eab809c07102126bd5f8e5425","analyzedAt":"2026-08-21T22:01:08.818Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}