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
node version: none (this is relative to usage in the browser)
joi version: 16
environment (node, browser): browser
used with (hapi, standalone, ...): standalone
What are you trying to achieve or the steps to reproduce ?
I want to simply load joi to use it in the browser (chrome). I created a client-side build using the webpack configuration provided in the "browser" directory.
When loading the build produced by webpack, an error in thrown:
This happens because webpack will always return plain js object here (lib/index.js):
constTrace=require('./trace');
Note: the "null-loader" is being used with lib/trace.js, but the effect is that it will erase all the code when creating the output. So we end up with a plain object when we require('./trace') (but still, a truthy value)
Context
What are you trying to achieve or the steps to reproduce ?
I want to simply load joi to use it in the browser (chrome). I created a client-side build using the webpack configuration provided in the "browser" directory.
When loading the build produced by webpack, an error in thrown:
This happens because webpack will always return plain js object here (lib/index.js):
Note: the "null-loader" is being used with
lib/trace.js
, but the effect is that it will erase all the code when creating the output. So we end up with a plain object when werequire('./trace')
(but still, a truthy value)What did you expect ?
The browser build should load without any errors.
Fixed in pr #2082
The text was updated successfully, but these errors were encountered: