UNPKG

@zohodesk/client_build_tool

Version:

A CLI tool to build web applications and client libraries

24 lines (20 loc) 561 B
"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; }