{"library":"relay-compiler-webpack-plugin","title":"relay-compiler-webpack-plugin","description":"Automatically run the Relay Compiler from within the Webpack build process, eliminating manual compilation steps. Version 9.1.0 supports relay-compiler >=8.0.0, webpack >=3.0.0, and graphql >=14.0.0. Regularly updated with each Relay major release. Key differentiators: hooks (beforeWrite, afterWrite) for custom tooling, TypeScript plugin support via relay-compiler-language-typescript, and webpack 5 compatibility. Lighter-weight alternative to Babel macro-based solutions.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install relay-compiler-webpack-plugin"],"cli":null},"imports":["const RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin');","const { getHooks } = require('relay-compiler-webpack-plugin');","new (require('relay-compiler-webpack-plugin'))({ schema: './schema.graphql', src: './src' })"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n  // ... webpack config\n  plugins: [\n    new RelayCompilerWebpackPlugin({\n      schema: path.resolve(__dirname, './schema.graphql'),\n      src: path.resolve(__dirname, './src'),\n      customScalars: {\n        DateTime: 'string'\n      }\n    })\n  ]\n};","lang":"javascript","description":"Shows minimal webpack config to auto-run relay-compiler with custom scalar support.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}