is this issue currently blocking your project? (no):
is this issue affecting a production system? (yes):
Context
node version: v 12.16.3
module version: 2.0.1
environment (e.g. node, browser, native): Browser
used with (e.g. hapi application, another framework, standalone, ...): React + Node App
any other relevant information:
How can we help?
I am using joi-date from hapi as follows
const joiDate = require('@hapi/joi-date');
The arrow function used in joi-date is not getting transpiled in IE11 due to which my app does not work in IE11. Attached screenshot from IE11. I get a syntax error and clicking on the link leads me to the screenshot below
I am using babel7 and webpack4
Here is my webpack config
{
test: /\.js$/,
exclude: /node_modules\/(?!.*hapi\/joi-date)/,
loader: 'babel-loader',
},
Tried using function version as well but did not help
exclude: function(modulePath) {
return /node_modules/.test(modulePath) &&
!/node_modules\/@hapi\/joi-date/.test(modulePath);
},
.babelrc entries
{
"presets": [
"@babel/env",
"@babel/react",
"@babel/preset-flow"
],
"env": {
"development": {
"plugins": [
"react-hot-loader/babel"
]
}
},
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": 2,
"helpers": false,
"regenerator": true
}
],
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-proposal-optional-chaining",
[
"@babel/plugin-proposal-pipeline-operator",
{
"proposal": "minimal"
}
],
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-proposal-do-expressions",
"@babel/plugin-proposal-function-bind"
]
}
I tried adding @babel/plugin-transform-arrow-functions plugin as well but it did not help
Unfortunately, no community resources were available to help resolve this issue after two weeks, and it is being closed. We close unresolved community issues to keep the issue tracker organized and effective.
Support plan
Context
How can we help?
I am using joi-date from hapi as follows const joiDate = require('@hapi/joi-date');
The arrow function used in joi-date is not getting transpiled in IE11 due to which my app does not work in IE11. Attached screenshot from IE11. I get a syntax error and clicking on the link leads me to the screenshot below
I tried adding @babel/plugin-transform-arrow-functions plugin as well but it did not help