facebook / facebook/relay

Breaking change not mentioned relay-runtime.min.js is not ES5 compatible

Open
#3,257 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

The artifacts included within the package, specially `relay-runtime.min.js` is not ES5 compatible as until v9.1 due the introduction of a generator function (not transpiled):

https://github.com/facebook/relay/blob/97401cb6361efcef94a8ffbf6e636ef60cda670d/packages/relay-runtime/store/RelayModernStore.js#L651

I could not find in the release notes a breaking change mention about it, but I might do not see other recommendations about artifacts bundled. Are there mentioned somewhere else?

Might be fixed adding `@babel/plugin-transform-regenerator` to the `postPlugins` for babel?

https://github.com/facebook/relay/blob/be1c6ecee9034372e9945f34ea8b27e65e158009/gulpfile.js#L22

Note: this impacted in our codebase because we are using these artifacts as UMD without any re-bundle on top.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.