We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a specific place I should be placing this in a Rails project?
MiniRacer::Platform.set_flags! :harmony
I have it in config/initializers/mini_racer.rb
However, I'm still getting this error when trying to use Intl when prerendering a component:
Intl
React::ServerRendering::PrerenderError (Encountered error "#<ExecJS::ProgramError: ReferenceError: Intl is not defined>" when prerendering
Or, could it be possible that Intl just still not supported, even with :harmony enabled?
The text was updated successfully, but these errors were encountered:
It looks like Intl support has to be enabled independently: https://v8.dev/docs/i18n#embedding-v8
Sorry, something went wrong.
Ah, but see here wrt i18n support: rubyjs/libv8#278
I've got the same error trying to do the same thing. Did you ever figure this out?
This is fixed by #166
c = MiniRacer::Context.new c.eval("['1','b','c','a','\u00E4'].sort(new Intl.Collator('en').compare);") # => ["1", "a", "\u00E4", "b", "c"] c.eval("['1','b','c','a','\u00E4'].sort(new Intl.Collator('sv').compare);") # => ["1", "a", "b", "c", "\u00E4"]
Has your initial problem been solved, @ksweetie?
No branches or pull requests
Is there a specific place I should be placing this in a Rails project?
MiniRacer::Platform.set_flags! :harmony
I have it in config/initializers/mini_racer.rb
However, I'm still getting this error when trying to use
Intl
when prerendering a component:React::ServerRendering::PrerenderError (Encountered error "#<ExecJS::ProgramError: ReferenceError: Intl is not defined>" when prerendering
Or, could it be possible that Intl just still not supported, even with :harmony enabled?
The text was updated successfully, but these errors were encountered: