I receive following error in safari and chrome on devices like iPhone 6S
SyntaxError: Unexpected keyword 'const'. Const declarations are not supported in strict mode.
I found that problem is in material-color library that is used in this project. Added comment to closed issue https://github.com/shuhei/material-colors/issues/13
To compile my app I use webpack2. I do exclude node_modules from compilation so I cant use babel plugin to parse it http://stackoverflow.com/questions/33878586/safari-babel-webpack-const-declarations-are-not-supported-in-strict-mode
I solved my problem by adding another rule for the material-colors
{
test: /\.js$/,
include: [
path.resolve(process.cwd(), "node_modules/material-colors/")
],
loader: 'babel-loader',
query: {
plugins: ['transform-runtime', 'transform-es2015-block-scoping'],
}
},
Nice workaround @darkowic, how do you deal with slow build times though?
I do not use this library anymore (not directly at least :) ). And also this is fixed by #317
Most helpful comment
I solved my problem by adding another rule for the material-colors