You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Also be sure to configure the TypeScript compiler to transpile to `es2015` modules and leave transpilation to `commonjs` modules up to Babel with the following `tsconfig.json` settings:
43
+
Also be sure to configure the TypeScript compiler to transpile to `es2015`
44
+
modules and leave transpilation to `commonjs` modules up to Babel with the
45
+
following `tsconfig.json` settings:
44
46
45
47
```json
46
48
{
@@ -51,34 +53,54 @@ Also be sure to configure the TypeScript compiler to transpile to `es2015` modul
51
53
}
52
54
```
53
55
54
-
The reason for this is that `tsc` would otherwise generate code where the imported `graphql` function is being namespaced (`react_relay_1` in this example):
56
+
The reason for this is that `tsc` would otherwise generate code where the
57
+
imported `graphql` function is being namespaced (`react_relay_1` in this
…and this makes it impossible for `babel-plugin-relay` to find the locations where the `graphql` function is being used.
69
+
…and this makes it impossible for `babel-plugin-relay` to find the locations
70
+
where the `graphql` function is being used.
63
71
64
-
Note that this does mean you need to configure Babel to transform the ES module `import` and `export` statements, by using the [`babel-plugin-transform-es2015-modules-commonjs`](https://babeljs.io/docs/plugins/transform-es2015-modules-commonjs/) transform plugin, if you’re not already.
72
+
Note that this does mean you need to configure Babel to transform the ES module
React Hot Loader is known to not always work well with generated code such as our typing artefacts, which will lead to loading modules _with_ TypeScript types into the browser and break. As a maintainer of RHL [pointed out](https://github.com/gaearon/react-hot-loader/issues/1032) in a similar issue:
81
+
React Hot Loader is known to not always work well with generated code such as
82
+
our typing artefacts, which will lead to loading modules _with_ TypeScript types
83
+
into the browser and break. As a maintainer of RHL
84
+
[pointed out](https://github.com/gaearon/react-hot-loader/issues/1032) in a
85
+
similar issue:
71
86
72
-
> The problem - hot reloading is not "complete"
87
+
> The problem - hot reloading is not "complete"
73
88
74
-
So [until RHL will be made “complete”](https://github.com/gaearon/react-hot-loader/issues/1024) this project can’t gurantee to always work well with it, nor is it our control to do anything about that.
89
+
So
90
+
[until RHL will be made “complete”](https://github.com/gaearon/react-hot-loader/issues/1024)
91
+
this project can’t gurantee to always work well with it, nor is it our control
92
+
to do anything about that.
75
93
76
-
## Examples
94
+
## Also see
77
95
78
-
You can find a copy of the Relay
79
-
[example TODO app](https://github.com/kastermester/relay-compiler-language-typescript/tree/master/example) inside this
80
-
repository or you can take a look at the [Artsy React Native app](https://github.com/artsy/emission).
96
+
* You can find a copy of the Relay
97
+
[example TODO app](https://github.com/kastermester/relay-compiler-language-typescript/tree/master/example)
98
+
inside this repository or you can take a look at the
0 commit comments