"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CSS_MODULE_TYPE = void 0;
exports.getFilenameFromModule = getFilenameFromModule;
const CSS_MODULE_TYPE = 'css/mini-extract';
exports.CSS_MODULE_TYPE = CSS_MODULE_TYPE;

function getFilenameFromModule(webpackModule) {
  const {
    userRequest
  } = webpackModule;

  if (webpackModule.type === CSS_MODULE_TYPE) {
    const {
      _identifier: identifier = ''
    } = webpackModule;
    return identifier.slice(identifier.lastIndexOf('!') + 1);
  }

  return userRequest;
}