3 years ago

Laravel elixir error when using for ... of

Posted 3 years ago by wizo

I have the following for... of statement:

for (let name of ['john', 'mya', 'mo']) {


Now when webpack from laravel-elixir is compiling this, it gives me the following error:

ERROR in ./xxxxxxxxxxxxxxx
Module build failed: Error
    at ForOfStatement.initialise (/xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:2004:65)
    at /xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:9381:56
    at Array.forEach (native)
    at BlockStatement.initialise (/xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:9381:15)
    at FunctionExpression.initialise (/xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:858:12)
    at FunctionExpression.initialise (/xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:2098:31)
    at Node.initialise (/xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:858:12)
    at /xxxxxxxxxxxxxxx/node_modules/buble/dist/buble.umd.js:856:61
    at Array.forEach (native)

I am building a js client for the browser. I really don't have a clue, why this doesn't work? Is it not allowed to use for ... of in webpack? I am using the latest laravel-elixir.

Please sign in or create an account to participate in this conversation.