import React from 'react' import HelloWorld from '@cp/HelloWorld' import Image from '@cp/Image' function isWindow() { try { window.isNaN(1) return true } catch { return false } } export default class Index extends React.Component { public render() { if (isWindow()) { throw new Error('Test') } return( <> Hello World Hello World ) } }