googlearchive / polyclean

BSD 3-Clause "New" or "Revised" License
20 stars 7 forks source link

ES6 arrow function breaks polyclean.uglifyJs #18

Closed wuyuanyi135 closed 8 years ago

wuyuanyi135 commented 8 years ago
node version: 5.6.0
"gulp": "^3.9.0",
"gulp-vulcanize": "^6.1.0",
"polyclean": "^1.3.1",

html entry

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <script type="text/javascript">
            () => {
                console.log("hi");
            };
        </script>
    </body>
</html>

gulpfile.js

    var stream_manage = gulp.src('index.html')
        .pipe(vulcanize(option))
        .on('error', gutil.log)
        .pipe(polyclean.uglifyJs())
        .pipe(gulp.dest('app'));

After execute gulp build, caught error [Error: no writecb in Transform class].