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

                          主站蜘蛛池模板: 在线一区二区国产 | 午夜视频导航 | 日韩成人 | 亚洲免费观看视频 | 中文字幕日韩一区 | 涩涩视频在线看 | 亚洲91视频 | 日本久草视频 | 国产精品视频一二三区 | 99在线精品视频 | 中文字幕精品视频在线观看 | 一区二区三区电影网 | 精品国产欧美在线 | 国产精品一区二区福利视频 | 欧美日韩国产一区二区三区 | 国内激情av片 | 国产精品久久久久久久岛一牛影视 | 午夜一级黄色片 | 久久精品a级毛片 | 欧美激情综合五月色丁香小说 | 亚洲综合色视频在线观看 | 男人视频网站 | 久草新在线 | 狠狠操电影| av在线一区二区 | 久热伊人| 日本高清中文字幕 | 成人av一区二区三区 | 国产精品久久久久久久久久久久午夜片 | 国产精品久久久久久二区 | 午夜资源| 免费观看黄色一级片 | eeuss国产一区二区三区四区 | 欧美亚州 | 国产成人精品亚洲日本在线观看 | 一级毛片免费完整视频 | 国产在线精品一区二区三区 | 噜噜噜噜狠狠狠7777视频 | 久久亚洲91| 女生羞羞网站 | 在线视频一区二区三区 |