Closed Cweili closed 6 years ago
This is due to the transpiled code declaring itself as strict, but not being really strict. In some cases this occurs because a third-party tool inserts a use strict
into the original or transpiled code (eg webpack). Try declaring the original file as strict
as well so nodent (fast-async) knows you intend to ship strict code (it doesn't if the use strict
was added after compilation). The underlying cause is that iOS 9 doesn't hoist functions nested in blocks in strict mode, unlike every other JS engine out there.
See https://github.com/MatAtBread/fast-async/issues/30 for more details. The history of wh it is the way it is can be found at https://github.com/MatAtBread/nodent/issues/22
fast-async compiled code throws
SyntaxError: Strict mode does not allow function declarations in a lexically nested statement
in IOS 9.x..babelrc :
source code:
compiled code:
Could you fix this? Thanks very much for your hard work.