def webpack_asset(path, asset_paths=asset_paths, debug=settings.DEBUG_MODE):
 if (not asset_paths):
  logger.warn('webpack-assets.json has not yet been generated. Falling back to non-cache-busted assets')
  return path
 if (not debug):
  key = path.replace(base_static_path, '').replace('.js', '')
  hash_path = asset_paths[key]
  return os.path.join(base_static_path, hash_path)
 else:
  return path

def webpack_asset ( path , asset_paths = asset_paths , debug = settings . DEBUG_MODE ) : if ( not asset_paths ) : logger . warn ( 'webpack-assets.json has not yet been generated. Falling back to non-cache-busted assets' ) return path if ( not debug ) : key = path . replace ( base_static_path , '' ) . replace ( '.js' , '' ) hash_path = asset_paths [ key ] return os . path . join ( base_static_path , hash_path ) else : return path
mako filter that resolves a human-readable asset path to its name on disk .