久久久久久久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>

                          主站蜘蛛池模板: 在线观看成人精品 | 欧美黑人巨大videos精品 | 高清av在线 | 久久丁香 | www.久草.com| 狠狠狠色丁香婷婷综合久久五月 | 亚洲国产aⅴ成人精品无吗 亚洲精品久久久一区二区三区 | 成人国产在线视频 | 中文av电影 | 国产精品久久久久久久久久久久 | 日韩精品一区二区三区 | 亚洲网在线 | 欧美一级久久久猛烈a大片 日韩av免费在线观看 | 黄色片网站在线观看 | 色综合99 | 久久久久成人精品 | 久热国产在线 | 国产小视频在线 | 一区二区三区精品在线视频 | 久久精品国产亚洲a | 成人依人 | 国产成人综合网 | 午夜精品视频一区 | 亚洲精品4 | 中文字幕亚洲国产 | 精品欧美一区二区精品久久久 | 成人精品国产一区二区4080 | 国产精品国产a级 | 国产精品99精品久久免费 | 精品一区二区三区四区五区 | 国产精品18hdxxxⅹ在线 | 成人免费共享视频 | 精品人伦一区二区三区蜜桃网站 | 久久久久一区二区三区 | 欧美激情视频一区二区三区在线播放 | 国产精品久久久久久婷婷天堂 | 伊人狼人影院 | 中文字幕1区 | 中文字幕在线三区 | 可以免费看的毛片 | 欧美最猛黑人xxxx黑人 |