Safari is failing to load my React app with this line:
Const declarations are not supported in strict mode.
When I look at the line that's failing I'm seeing:
const Crypto = __webpack_require__(624)
This isn't something in my app so it must be injected by Webpack or another dependency.
Shouldn't Babel replace const
with var
?
Babel Dependencies
"babel": "~6.1.0",
"babel-core": "~6.2.0",
"babel-loader": "~6.2.0",
"babel-plugin-transform-runtime": "~6.1.0",
"babel-polyfill": "~6.2.0",
"babel-preset-es2015": "~6.1.0",
"babel-preset-react": "~6.1.0",
"babel-preset-stage-0": "~6.1.0",
"babel-runtime": "~6.2.0"
Babel Loader Config
{
test: /\.js|\.jsx$/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
cacheDirectory: true,
plugins: ['transform-runtime'],
presets: ['es2015', 'react', 'stage-0']
}
}
NOTE My app does work in Chrome.