Skip to content

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Jul 23, 2024

This fixes rescript-lang/rescript#6905.

%external is weird and not typesafe and should probably be removed from the compiler.

Make use of globalThis instead. Downside: In older browsers, globalThis will need to be polyfilled. It is supported in all modern browsers though, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis.

@cknitt cknitt requested review from cometkim, cristianoc and zth July 23, 2024 15:33
@cknitt cknitt merged commit 543ce14 into master Jul 24, 2024
@cknitt cknitt deleted the no-percent-external branch July 24, 2024 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RescriptReactRouter crash on master (window vs. $$window)

3 participants