babel-plugin-relay 19.0.0 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BabelPluginRelay.js.flow +2 -1
- package/compileGraphQLTag.js.flow +1 -1
- package/index.js +1 -1
- package/lib/compileGraphQLTag.js +1 -1
- package/macro.js +1 -1
- package/package.json +1 -1
package/BabelPluginRelay.js.flow
CHANGED
@@ -41,7 +41,8 @@ export type RelayPluginOptions = {
|
|
41
41
|
// Name of the global variable for dev mode
|
42
42
|
isDevVariableName?: string,
|
43
43
|
|
44
|
-
//
|
44
|
+
// Enable generating eager es modules for modern runtime.
|
45
|
+
// Defaults to `true` as of v19.0.1
|
45
46
|
eagerEsModules?: boolean,
|
46
47
|
|
47
48
|
// Directory as specified by artifactDirectory when running relay-compiler
|
@@ -68,7 +68,7 @@ function compileGraphQLTag(
|
|
68
68
|
);
|
69
69
|
}
|
70
70
|
|
71
|
-
const eagerEsModules = state.opts?.eagerEsModules ??
|
71
|
+
const eagerEsModules = state.opts?.eagerEsModules ?? true;
|
72
72
|
const isHasteMode = state.opts?.jsModuleFormat === 'haste';
|
73
73
|
const isDevVariable = state.opts?.isDevVariableName;
|
74
74
|
const artifactDirectory = state.opts?.artifactDirectory;
|
package/index.js
CHANGED
package/lib/compileGraphQLTag.js
CHANGED
@@ -21,7 +21,7 @@ function compileGraphQLTag(t, path, state, ast) {
|
|
21
21
|
if (definition.kind !== 'FragmentDefinition' && definition.kind !== 'OperationDefinition') {
|
22
22
|
throw new Error('BabelPluginRelay: Expected a fragment, mutation, query, or ' + 'subscription, got `' + definition.kind + '`.');
|
23
23
|
}
|
24
|
-
var eagerEsModules = (_state$opts$eagerEsMo = (_state$opts = state.opts) === null || _state$opts === void 0 ? void 0 : _state$opts.eagerEsModules) !== null && _state$opts$eagerEsMo !== void 0 ? _state$opts$eagerEsMo :
|
24
|
+
var eagerEsModules = (_state$opts$eagerEsMo = (_state$opts = state.opts) === null || _state$opts === void 0 ? void 0 : _state$opts.eagerEsModules) !== null && _state$opts$eagerEsMo !== void 0 ? _state$opts$eagerEsMo : true;
|
25
25
|
var isHasteMode = ((_state$opts2 = state.opts) === null || _state$opts2 === void 0 ? void 0 : _state$opts2.jsModuleFormat) === 'haste';
|
26
26
|
var isDevVariable = (_state$opts3 = state.opts) === null || _state$opts3 === void 0 ? void 0 : _state$opts3.isDevVariableName;
|
27
27
|
var artifactDirectory = (_state$opts4 = state.opts) === null || _state$opts4 === void 0 ? void 0 : _state$opts4.artifactDirectory;
|
package/macro.js
CHANGED