17 lines
414 B
JavaScript
17 lines
414 B
JavaScript
|
import { canUseDOM } from 'exenv';
|
||
|
|
||
|
export default (() => {
|
||
|
if (!canUseDOM) {
|
||
|
return {};
|
||
|
}
|
||
|
|
||
|
return {
|
||
|
port: window.location.port,
|
||
|
protocol: window.location.protocol.replace(/:$/, ''),
|
||
|
hostname: window.location.hostname,
|
||
|
__REDUX_DEVTOOLS_EXTENSION__: window.__REDUX_DEVTOOLS_EXTENSION__,
|
||
|
__APOLLO_STATE__: window.__APOLLO_STATE__,
|
||
|
__REDUX_STATE__: window.__REDUX_STATE__
|
||
|
};
|
||
|
})();
|