<bdo id='9OTGj'></bdo><ul id='9OTGj'></ul>

      1. <small id='9OTGj'></small><noframes id='9OTGj'>

      2. <legend id='9OTGj'><style id='9OTGj'><dir id='9OTGj'><q id='9OTGj'></q></dir></style></legend>
        <tfoot id='9OTGj'></tfoot>

        <i id='9OTGj'><tr id='9OTGj'><dt id='9OTGj'><q id='9OTGj'><span id='9OTGj'><b id='9OTGj'><form id='9OTGj'><ins id='9OTGj'></ins><ul id='9OTGj'></ul><sub id='9OTGj'></sub></form><legend id='9OTGj'></legend><bdo id='9OTGj'><pre id='9OTGj'><center id='9OTGj'></center></pre></bdo></b><th id='9OTGj'></th></span></q></dt></tr></i><div id='9OTGj'><tfoot id='9OTGj'></tfoot><dl id='9OTGj'><fieldset id='9OTGj'></fieldset></dl></div>
      3. 使用 Gulp 缩小(不转译)ES2015 代码

        时间:2023-05-28
          <tbody id='kyzPO'></tbody>
      4. <tfoot id='kyzPO'></tfoot>

          <legend id='kyzPO'><style id='kyzPO'><dir id='kyzPO'><q id='kyzPO'></q></dir></style></legend>

            • <small id='kyzPO'></small><noframes id='kyzPO'>

              • <bdo id='kyzPO'></bdo><ul id='kyzPO'></ul>

                <i id='kyzPO'><tr id='kyzPO'><dt id='kyzPO'><q id='kyzPO'><span id='kyzPO'><b id='kyzPO'><form id='kyzPO'><ins id='kyzPO'></ins><ul id='kyzPO'></ul><sub id='kyzPO'></sub></form><legend id='kyzPO'></legend><bdo id='kyzPO'><pre id='kyzPO'><center id='kyzPO'></center></pre></bdo></b><th id='kyzPO'></th></span></q></dt></tr></i><div id='kyzPO'><tfoot id='kyzPO'></tfoot><dl id='kyzPO'><fieldset id='kyzPO'></fieldset></dl></div>
                1. 本文介绍了使用 Gulp 缩小(不转译)ES2015 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  如何缩小 ES2015 代码而不将其转换为 ES5?流行的 gulp-minifygulp-uglify 模块不适用于简单地缩小 ES2015 代码.

                  How to minify ES2015 code without transpiling it to ES5? The popular gulp-minify and gulp-uglify modules do not work with simply minifying ES2015 code.

                  推荐答案

                  现在可以在不转译代码的情况下缩小 ES2015.babel minify(以前是 babili)是一个 babel 预设这样做.

                  It is now possible to minify ES2015 without transpiling the code. babel minify (previously babili) is a babel preset that does that.

                  要安装:

                  npm install --save-dev babel-preset-minify
                  

                  要将它与 gulp 一起使用:

                  To use it with gulp you do:

                  var gulp = require('gulp')
                  var babel = require('gulp-babel')
                  gulp.task('default', () => {
                    return gulp.src('src/app.js')
                    .pipe(babel({presets: ['minify']}))
                    .pipe(gulp.dest('dist'))
                  })
                  

                  这篇关于使用 Gulp 缩小(不转译)ES2015 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何从以前的 typescript(.ts) 文件中删除已编译的 下一篇:在 LESS 文件中出现错误后,Gulp.js 停止编译 LESS

                  相关文章

                  最新文章

                  • <bdo id='UdW1z'></bdo><ul id='UdW1z'></ul>
                  <tfoot id='UdW1z'></tfoot>

                    1. <i id='UdW1z'><tr id='UdW1z'><dt id='UdW1z'><q id='UdW1z'><span id='UdW1z'><b id='UdW1z'><form id='UdW1z'><ins id='UdW1z'></ins><ul id='UdW1z'></ul><sub id='UdW1z'></sub></form><legend id='UdW1z'></legend><bdo id='UdW1z'><pre id='UdW1z'><center id='UdW1z'></center></pre></bdo></b><th id='UdW1z'></th></span></q></dt></tr></i><div id='UdW1z'><tfoot id='UdW1z'></tfoot><dl id='UdW1z'><fieldset id='UdW1z'></fieldset></dl></div>

                      <small id='UdW1z'></small><noframes id='UdW1z'>

                      <legend id='UdW1z'><style id='UdW1z'><dir id='UdW1z'><q id='UdW1z'></q></dir></style></legend>