Skip to content

ignore do not support the relative path #85

@alexsunxl

Description

@alexsunxl

Dear,
I find that this ignore options do not support the relative path.
My gulpfile.js code like this:

gulp.task('test', function(){
    return gulp.src('script/modal.js')
        .pipe(browserify({
            //ignore: [./script/jquery.js]     //relative path.  it is invalid!!
            ignore: [require.resolve('./script/jquery.js')] // I need to write like this way 
        }))
        .pipe(gulp.dest('./dist'));
  });

I think it can be write in the source, so that the options can support relative path also
such as

    [
      'exclude',
      'add',
      'external',
      'transform',
      'ignore',
      'require'
    ].forEach( function(method) {
      if (!opts[method]) return;
      [].concat(opts[method]).forEach(function (args) {
        //here args  dispose to a absolute path first.
        bundler[method].apply(bundler, [].concat(args));
      });
    });

Thanks for you time : )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions