Using Gulp-babel And Getting "argument Name Clash In Strict Mode"
I'm trying to use gulp-babel so I can start writing some ES6 / ES2015 code inside of my ES5 app. var gulp = require('gulp'), gutil = require('gulp-util'),
Solution 1:
The error isn't in your quoted code, it's on line 2774 of tickertags.bundle.min.js
. Babel isn't the problem, Babel is reporting the problem.
In strict mode, this is an error:
function foo(a, a) {
}
Note that a
has been used as an argument name twice. That's valid loose code, but not valid strict code. That's what the error message is telling you about.
Here's the error replicated in Babel's REPL.
Here's the error replicated in your browser, if your browser correctly supports strict mode:
"use strict";
functionfoo(a, a) {
}
On Chrome, the error is
Uncaught SyntaxError: Duplicate parameter name not allowed in this context
Post a Comment for "Using Gulp-babel And Getting "argument Name Clash In Strict Mode""