0.0.0-main-ffee9785 • Published 7 months ago
atl-babel-plugin-relay v0.0.0-main-ffee9785
babel-plugin-relay
Relay requires a Babel plugin to convert GraphQL tags to runtime artifacts.
A very simplified example of what this plugin is doing:
// It converts this code
const fragment = graphql`
fragment User_fragment on User {
name
}
`;
// To require generated ASTs for fragments and queries
const fragment = require('__generated__/User_fragment.graphql');
Plugin Configuration
babel-plugin-relay
will discover the config if:
- There is a
relay.config.json
,relay.config.js
file at the root of the project (i.e. in the same folder as thepackage.json
file). - The
package.json
file contains a"relay"
key.
Supported configuration options for babel-plugin-relay
artifactDirectory
A specific directory to output all artifacts to. When enabling this the babel plugin needsartifactDirectory
to be set as well. stringeagerEsModules
This option enables emitting ES modules artifacts. booleancodegenCommand
The command to run to compile Relay files. stringisDevVariableName
Name of the global variable for dev mode (e.g.__DEV__
). stringjsModuleFormat
Formatting style for generated files.commonjs
orhaste
. Default iscommonjs
. string
0.0.0-main-7576e2c4
7 months ago
0.0.0-main-a41dab2f
7 months ago
0.0.0-main-322a3fb0
7 months ago
0.0.0-main-86d355c1
11 months ago
0.0.0-main-8caa9335
1 year ago
0.0.0-main-d9b797a8
1 year ago
0.0.0-main-d7d54856
1 year ago
0.0.0-main-ee494615
2 years ago
0.0.0-main-d8940380
1 year ago
0.0.0-main-15d4f51f
2 years ago
0.0.0-main-df163556
1 year ago
0.0.0-main-2fdd0cd4
2 years ago
0.0.0-main-96a86e2c
2 years ago
0.0.0-main-d2fd8542
2 years ago
0.0.0-main-0acb179c
2 years ago
0.0.0-main-16251cbf
2 years ago
0.0.0-main-a011e2ef
2 years ago
0.0.0-main-dca70be3
2 years ago
0.0.0-main-7a7c269a
2 years ago
0.0.0-main-ae9a46b8
2 years ago
0.0.0-main-095491e5
2 years ago
0.0.0-main-f5877bfe
2 years ago
0.0.0-main-accde866
2 years ago
0.0.0-main-41a286f0
2 years ago
0.0.0-main-31f24c70
2 years ago
0.0.0-main-ffee9785
2 years ago