久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <bdo id='0aVxs'></bdo><ul id='0aVxs'></ul>
  1. <tfoot id='0aVxs'></tfoot>

    <small id='0aVxs'></small><noframes id='0aVxs'>

    1. <legend id='0aVxs'><style id='0aVxs'><dir id='0aVxs'><q id='0aVxs'></q></dir></style></legend>
    2. <i id='0aVxs'><tr id='0aVxs'><dt id='0aVxs'><q id='0aVxs'><span id='0aVxs'><b id='0aVxs'><form id='0aVxs'><ins id='0aVxs'></ins><ul id='0aVxs'></ul><sub id='0aVxs'></sub></form><legend id='0aVxs'></legend><bdo id='0aVxs'><pre id='0aVxs'><center id='0aVxs'></center></pre></bdo></b><th id='0aVxs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0aVxs'><tfoot id='0aVxs'></tfoot><dl id='0aVxs'><fieldset id='0aVxs'></fieldset></dl></div>
    3. gulp browserify reactify 任務很慢

      gulp browserify reactify task is quite slow(gulp browserify reactify 任務很慢)
        <bdo id='tsmbO'></bdo><ul id='tsmbO'></ul>

        <i id='tsmbO'><tr id='tsmbO'><dt id='tsmbO'><q id='tsmbO'><span id='tsmbO'><b id='tsmbO'><form id='tsmbO'><ins id='tsmbO'></ins><ul id='tsmbO'></ul><sub id='tsmbO'></sub></form><legend id='tsmbO'></legend><bdo id='tsmbO'><pre id='tsmbO'><center id='tsmbO'></center></pre></bdo></b><th id='tsmbO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='tsmbO'><tfoot id='tsmbO'></tfoot><dl id='tsmbO'><fieldset id='tsmbO'></fieldset></dl></div>
        <tfoot id='tsmbO'></tfoot>

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

            <tbody id='tsmbO'></tbody>

              • <legend id='tsmbO'><style id='tsmbO'><dir id='tsmbO'><q id='tsmbO'></q></dir></style></legend>
                本文介紹了gulp browserify reactify 任務很慢的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我使用 Gulp 作為我的任務運行器和 browserify 來捆綁我的 CommonJs 模塊.

                I am using Gulp as my task runner and browserify to bundle my CommonJs modules.

                我注意到運行我的 browserify 任務非常慢,大約需要 2 到 3 秒,而且我只有 React 和一些我為開發而構建的非常小的組件.

                I have noticed that running my browserify task is quite slow, it takes around 2 - 3 seconds, and all I have is React and a few very small components I have built for development.

                有沒有辦法加快任務,或者我的任務中有什么明顯的問題?

                Is there a way to speed up the task, or do I have any noticeable problems in my task?

                gulp.task('browserify', function() {
                  var bundler = browserify({
                    entries: ['./main.js'], // Only need initial file
                    transform: [reactify], // Convert JSX to javascript
                    debug: true, cache: {}, packageCache: {}, fullPaths: true
                  });
                
                  var watcher  = watchify(bundler);
                
                  return watcher
                  .on('update', function () { // On update When any files updates
                    var updateStart = Date.now();
                        watcher.bundle()
                        .pipe(source('bundle.js'))
                        .pipe(gulp.dest('./'));
                        console.log('Updated ', (Date.now() - updateStart) + 'ms');
                  })
                  .bundle() // Create initial bundle when starting the task 
                  .pipe(source('bundle.js'))
                  .pipe(gulp.dest('./'));
                });
                

                我正在使用 Browserify、Watchify、Reactify 和 Vinyl Source Stream 以及其他一些不相關的模塊.

                I am using Browserify, Watchify, Reactify and Vinyl Source Stream as well as a few other unrelated modules.

                var browserify = require('browserify'),
                watchify = require('watchify'),
                reactify = require('reactify'),
                source = require('vinyl-source-stream');
                

                謝謝

                推薦答案

                參見 使用 watchify 快速構建瀏覽器.請注意,傳遞給 browserify 的唯一內容是主入口點和 watchify 的配置.

                See fast browserify builds with watchify. Note that the only thing passed to browserify is the main entry point, and watchify's config.

                轉換被添加到 watchify 包裝器中.

                The transforms are added to the watchify wrapper.

                逐字粘貼的文章代碼

                var gulp = require('gulp');
                var gutil = require('gulp-util');
                var sourcemaps = require('gulp-sourcemaps');
                var source = require('vinyl-source-stream');
                var buffer = require('vinyl-buffer');
                var watchify = require('watchify');
                var browserify = require('browserify');
                
                var bundler = watchify(browserify('./src/index.js', watchify.args));
                // add any other browserify options or transforms here
                bundler.transform('brfs');
                
                gulp.task('js', bundle); // so you can run `gulp js` to build the file
                bundler.on('update', bundle); // on any dep update, runs the bundler
                
                function bundle() {
                  return bundler.bundle()
                    // log errors if they happen
                    .on('error', gutil.log.bind(gutil, 'Browserify Error'))
                    .pipe(source('bundle.js'))
                    // optional, remove if you dont want sourcemaps
                      .pipe(buffer())
                      .pipe(sourcemaps.init({loadMaps: true})) // loads map from browserify file
                      .pipe(sourcemaps.write('./')) // writes .map file
                    //
                    .pipe(gulp.dest('./dist'));
                }
                

                這篇關于gulp browserify reactify 任務很慢的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                  <tbody id='3SDFu'></tbody>

                    <small id='3SDFu'></small><noframes id='3SDFu'>

                    • <legend id='3SDFu'><style id='3SDFu'><dir id='3SDFu'><q id='3SDFu'></q></dir></style></legend>
                    • <tfoot id='3SDFu'></tfoot>

                          <bdo id='3SDFu'></bdo><ul id='3SDFu'></ul>
                          <i id='3SDFu'><tr id='3SDFu'><dt id='3SDFu'><q id='3SDFu'><span id='3SDFu'><b id='3SDFu'><form id='3SDFu'><ins id='3SDFu'></ins><ul id='3SDFu'></ul><sub id='3SDFu'></sub></form><legend id='3SDFu'></legend><bdo id='3SDFu'><pre id='3SDFu'><center id='3SDFu'></center></pre></bdo></b><th id='3SDFu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3SDFu'><tfoot id='3SDFu'></tfoot><dl id='3SDFu'><fieldset id='3SDFu'></fieldset></dl></div>

                          主站蜘蛛池模板: 国产原创在线观看 | 中文在线a在线 | 免费观看一级特黄欧美大片 | 人人干人人舔 | 成年免费视频 | 在线观看国产视频 | 成人免费在线观看 | 欧美日韩电影免费观看 | 国产成人亚洲精品 | 亚洲一区二区三区免费在线观看 | 91亚洲精品国偷拍自产在线观看 | 亚洲日韩欧美一区二区在线 | 国产91在线播放 | 成人在线观看免费 | 久草资源| 日本免费一区二区三区 | 激情a | 国产亚洲一区二区三区在线 | 一区二区在线视频 | 亚洲综合区 | 精品一区二区三区在线观看 | 欧美精品久久久 | 日韩成人在线视频 | 国产精品国产精品国产专区不片 | 国产精品久久久久一区二区三区 | 在线视频 亚洲 | 99久久久国产精品免费消防器 | h视频在线看 | 国产日韩欧美精品一区二区三区 | 在线四虎 | 午夜av成人| 成年人免费在线视频 | 亚洲精品免费看 | 老牛影视av一区二区在线观看 | 天天玩天天干天天操 | 亚洲高清视频在线观看 | 一级片网址 | 国产精品乱码一区二三区小蝌蚪 | 爱草在线 | 精品一区二区电影 | 日韩av资源站 |