gulp-bundle-assets icon indicating copy to clipboard operation
gulp-bundle-assets copied to clipboard

Custom transformation could affect order of files in bundle.

Open acheshkov opened this issue 6 years ago • 0 comments

Hi,

I use custom conditional browserfy transformation. In resulting bundle I have a problem to keep order of files. In example bellow I expect that jquery will go first but it does not.

var tfm = bundle.transformHelper.browserify(mainStream);
var typescriptTransforms = lazypipe()
  .pipe(function() {
    return gif(isTypescriptFile,  tfm());
  });

module.exports = {
    bundle: {
      vendor: {
        options: {
            transforms: { scripts: typescriptTransforms},
            order: {
                scripts: [
                    '**/jquery-1.10.2.js',
                    '!**/jquery-1.10.2.js'
                ]
            }
        },
        scripts: [
            './Scripts/jquery-1.10.2.js',
             // ... other files 
            './ts/index.ts',
             // ... other files 
        ]
      }
    }
  };

acheshkov avatar Jul 10 '18 12:07 acheshkov