linkedin / eyeglass

NPM Modules for Sass
741 stars 60 forks source link

File ignored by eyeglass installer gets installed after restart. #237

Open chriseppstein opened 5 years ago

chriseppstein commented 5 years ago

Package This issue is related to the following monorepo package(s):

Description

There's a weird issue in a LinkedIn project where a file that isn't installed gets installed anyway.

let ignoredExtensions = new Set(['js', 'css']);
eyeglass.assets.installer(function myInstaller( 
  assetFile, 
  assetUri, 
  oldInstaller, 
  cb 
) { 
  const assetExtension = assetUri.split('.').pop(); 
  if ( 
    ignoredExtensions.has(assetExtension) 
  ) { 
    cb(null, assetFile); 
  } else { 
    oldInstaller(assetFile, assetUri, cb); 
  } 
}); 

Returning null should cause the asset to not be installed, but they are seeing that it is found after restarting the server.