Support plan
which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
is this issue currently blocking your project? (yes/no): no
is this issue affecting a production system? (yes/no): no
Context
node version: 12.13.0.
module version: 16.1.7
environment (e.g. node, browser, native): browser
used with (e.g. hapi application, another framework, standalone, ...):
any other relevant information: -
I am receiving an error regarding 'TextEncoder' coming from joi-browser.min.js when using ie11. Any ideas how to polyfill this?
I run into the same error when trying to generate a coverage report within my vue.js app.
{
"scripts": {
"cover": cross-env NODE_ENV=coverage nyc --reporter=lcov --reporter=text npm run test --all,
...
}
...
}
Doing the same using @hapi/joi < version 16.0.0 works perfectly.
This issue is probably related to https://github.com/hapijs/joi/issues/2141.
I suggest you use: https://github.com/anonyco/FastestSmallestTextEncoderDecoder to polyfill the missing functionality. You can also build your own browser version with some simple changes to the webpack config.
Supporting IE11 makes the bundle much bigger so it was excluded from the list of supported browsers. Can't make everyone happy.
Most helpful comment
I suggest you use: https://github.com/anonyco/FastestSmallestTextEncoderDecoder to polyfill the missing functionality. You can also build your own browser version with some simple changes to the webpack config.
Supporting IE11 makes the bundle much bigger so it was excluded from the list of supported browsers. Can't make everyone happy.