ampproject / ampproject/amphtml
I2D: mode.isLocalDev
Open
Stale
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
The code looks like this:
```javascript
export function isLocalDev(opt_win) {
if (isProd()) {
return false;
}
return !!self.AMP_CONFIG?.localDev || isTest(opt_win);
}
```
It's basically always used like `mode.isLocalDev(win) || mode.isTest(win)`
I can't think of any environment where `isProd()` is false that `isLocalDev` should also be false. This is causing challenges with testing/running Bento components, since `AMP_CONFIG` isn't available.
Can we drop this entirely and replace all calls with `!mode.isProd()`?
Contributor guide
Assessment
This issue has not been assessed yet.