How do you make relay-compiler run automatically?

Max Rozen
@RozenMD
@RozenMD
Making relay-compiler run automatically
Relay can be annoying to work with as relay-compiler
needs to run every time you change your GraphQL schema, or your resolvers.
With relay-compiler-webpack-plugin that's no longer the case - webpack can run it for you!
Here's how you use it:
const RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin');// rest of your confignew RelayCompilerWebpackPlugin({ schema: 'schema.graphql', src: 'src/', extensions: ['js', 'jsx', 'ts', 'tsx'], artifactDirectory: 'src/__generated__',}),