Skip to content

Commit

Permalink
Merge pull request #57 from sorenhoyer/master
Browse files Browse the repository at this point in the history
Updated README with instructions for TypeScript projects
  • Loading branch information
danielholmes authored Oct 10, 2020
2 parents d5e15b4 + f97b07b commit 96dbe8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ files for you.
2. Add the plugin to your Webpack configuration:

```javascript
// const RelayCompilerLanguageTypescript = require('relay-compiler-language-typescript').default
const RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin')
const path = require('path')

Expand All @@ -32,13 +33,15 @@ module.exports = {
plugins: [
// ...
new RelayCompilerWebpackPlugin({
// languagePlugin: RelayCompilerLanguageTypescript,
schema: path.resolve(__dirname, './relative/path/to/schema.graphql'), // or schema.json
src: path.resolve(__dirname, './relative/path/to/source/files'),
})
]
// ...
}
```
Note: TypeScript projects also needs to add the TypeScript language plugin as shown in the commented out lines in the above snippet.

3. :tada:

Expand Down

0 comments on commit 96dbe8c

Please sign in to comment.