don't throw errors for server side require`s

allow environment check also for locals
for instance:
```js
if (typeof window === 'undefined') {
  require('../local-component');
} else {
  require('local-component')
}
```