File tree Expand file tree Collapse file tree
entry_types/scrolled/package Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 "@headlessui/react" : " ^1.6.6" ,
1313 "classnames" : " ^2.3.2" ,
1414 "core-js" : " ^3.6.5" ,
15+ "core-js-pure" : " ^3.0.0" ,
1516 "debounce" : " ^1.2.0" ,
1617 "deep-assign" : " ^3.0.0" ,
1718 "intersection-observer" : " ^0.7.0" ,
Original file line number Diff line number Diff line change 11import 'core-js/stable' ;
22import 'core-js/features/typed-array/uint16-array' ;
3+ import URLPolyfill from 'core-js-pure/features/url' ;
34
45import React from 'react' ;
56import ReactRailsUJS from 'react_ujs' ;
67
78import { Root , setupI18n } from 'pageflow-scrolled/frontend' ;
89
10+ // The server-side rendering environment (ExecJS) lacks Web APIs like URL,
11+ // which `core-js/stable` no longer polyfills now that we target modern
12+ // browsers. Install it from core-js-pure (which the browser-targeted
13+ // transforms do not strip) so prerendering can use `new URL(...)`.
14+ if ( typeof global . URL === 'undefined' ) {
15+ global . URL = URLPolyfill ;
16+ }
17+
918ReactRailsUJS . getConstructor = function ( ) {
1019 // Normally this function receives the name of a component, but we
1120 // only need to render one type of component.
You can’t perform that action at this time.
0 commit comments