Giter Club home page Giter Club logo

Comments (5)

jsdf avatar jsdf commented on June 2, 2024

Cheers, sounds like it might be a race between cache loading and bundling or something... I'll look into it when I have time

from browserify-incremental.

Macil avatar Macil commented on June 2, 2024

I can consistently reproduce this. It never works the first time for me. I notice the cache file after the first run has an empty mtimes object (if brfs is used, then mtimes contains only the files that were included via fs.readFileSync). After the second run, the mtimes object is correctly populated and future browserifyinc runs are faster.

from browserify-incremental.

andrewhamon avatar andrewhamon commented on June 2, 2024

+1, same thing happening here. But it seems to at least work fine after second run.

Here is how I'm using it in Gulp:

var bundleOpts = { debug: true, paths: ['./app/frontend/scripts'], cacheFile: 'browserifyCache.json'}
var bundler = browserifyInc('app/frontend/scripts/app.js', bundleOpts)
bundler.transform(babelify)
bundler.transform(envify)

gulp.task('bundle', function () {
  return bundler.bundle()
    .pipe(plumber(plumber({ errorHandler: notify.onError('Error <%= error.message %>') })))
    .pipe(source('bundle.js'))
    .pipe(gulp.dest('build/frontend/scripts'))
    .pipe(browserSync.stream())
})

I'm have "browserify-incremental": "^3.0.1" and "browserify": "^11.0.1", in my package.json

from browserify-incremental.

iamrandys avatar iamrandys commented on June 2, 2024

+1 After building twice it works perfectly! My setup is almost identical to @andrewhamon . The versions I'm using are exactly the same.

from browserify-incremental.

iamrandys avatar iamrandys commented on June 2, 2024

I'm seeing the mtimes empty the first time as well.

"packages":{},"mtimes":{},"filesPackagePaths":{},"dependentFiles":{}

from browserify-incremental.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.