tophat / with-immutable-props-to-js

:smiling_imp: A higher-order component for keeping Immutable objects outside your presentational components

Home Page:https://with-immutable-props-to-js.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReferenceError: regeneratorRuntime is not defined thrown in some cases

msrose opened this issue · comments

For some reason, using this package broke SSR for one of Top Hat's internal projects (fe-marketplace), which is strange because the code existed almost in the exact same form in that project before being factored out. Need to investigate why that happened and figure out if there's any configuration we need within this package to support SSR. cc @tgrant59 for any more context.

Did some more investigation on this. I don't think this has to do specifically with SSR. Loading with-immutable-props fails with this error:
ReferenceError: regeneratorRuntime is not defined
This usually only happens if the polyfill for generators is not imported. Though I don't think that is the cause here, since we are importing babel-polyfill which provides the regenerator-runtime. I'm guessing there is a version mismatch somewhere. 🤷‍♂️
Will update when I have something more.

Awesome, thanks for the investigation @sanchitgera. Good to hear that this probably doesn't have anything to do with SSR, I'm going to rename the issue title.

Addressed in #39