fork from petergoes/gulp-babel-inline
<script></script>
这种标签 如果要严格匹配可以在options里面加上 scriptStrict
gulp-babel-script能匹配以下是常用配置:
gulp.task('handleHtml', function () {
gulp
.src(htmlSrc, {base:'./src'})
.pipe(babelScript({
presets: ['@babel/env'],
// scriptStrict:true // 不匹配<script></script>,这个配置不会传到babel里面
}))
.pipe(gulp.dest(dist))
})