Our project involves the use of imports and requires to include various third-party packages via NPM. Some of these packages are written in ES6 and need to be transpiled to ES5/ES2015 for compatibility with browsers like IE11, which do not support the arrow syntax used in functions.
While our own code is transpiled through Browserify into a more universally supported syntax, the imported packages like camelcase-keys
remain in their raw format. This works fine for browsers like Chrome and Edge, but breaks in IE due to lack of support for the syntax.
We have provided our current package.json and gulpfile.js for reference. Please let us know if you require any additional information.
package.json
{
"name": "app",
"private": true,
"dependencies": {
// List of dependencies here
},
"devDependencies": {
// List of devDependencies here
},
"browserify": {
"transform": [
[
"babelify",
{
"presets": [
"es2015"
],
"plugins": [
"transform-es2015-classes"
]
}
]
]
}
}
gulpfile.js
// List of gulp tasks and functions