I built a small ReactJS application that runs in the browser, i am having issues with older browser versions (especially on iOS devices), the application is built with node and browserify/babelify
I have the following gulpfile setup:
gulp.task('build', function () {
return browserify({entries: './src/app.jsx', extensions: ['.jsx'], debug: true})
.transform(babelify)
.bundle()
.pipe(source('app.js'))
.pipe(buffer())
.pipe(minify())
.pipe(gulp.dest('public/layout/lib'))
})
with the following config:
{
"presets": ["env"],
"plugins": ["transform-react-jsx"],
}
one of my react components imports a module like so:
import ethereum_address from 'ethereum-address'
the code works but for some reason the bablified bundle still has use strict
and some let
declarations that come from that specific module.
is there anything i can do to force the babelify to actually replace those declarations as needed so this code will work on older browsers?