You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using TypeScript and would like to use longjohn conditionally just in dev mode. Documentation suggests using conditional require:
if (process.env.NODE_ENV !== 'production'){
require('longjohn');
}
However, TypeScript imports are restricted to top-level, making it impossible to do such conditional check without falling back to commonJS-style require.
There is also a related issue: #61 - having the ability to disable longjohn after require would be a sufficient fix.
The text was updated successfully, but these errors were encountered:
I'm using TypeScript and would like to use longjohn conditionally just in dev mode. Documentation suggests using conditional require:
However, TypeScript imports are restricted to top-level, making it impossible to do such conditional check without falling back to commonJS-style require.
There is also a related issue: #61 - having the ability to disable longjohn after require would be a sufficient fix.
The text was updated successfully, but these errors were encountered: