HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/node_modules/underscore-template-loader/file-loader.js
/* This loader returns the filename if no loader takes care of the file */
'use strict';

var loaderUtils = require('loader-utils');

module.exports = function (source) {
  if (this.cacheable) {
    this.cacheable();
  }
  var query = this.query instanceof Object ? this.query : loaderUtils.parseQuery(this.query || '?');

  var allLoadersButThisOne = this.loaders.filter(function(loader) {
    return loader.module !== module.exports;
  });
  // This loader shouldn't kick in if there is any other loader
  if (allLoadersButThisOne.length > 0) {
    return source;
  }

  return 'module.exports = ' + JSON.stringify(query.url);
};