214 if (!static::isExists($this->path))
222 $useMinimized =
false;
223 $minPathPos = mb_strrpos(
$path,
'.');
224 if ($minPathPos !==
false)
226 $minPath = mb_substr(
$path, 0, $minPathPos)
228 .mb_substr(
$path, $minPathPos);
233 $useMinimized =
true;
235 $minPathPos = mb_strrpos($this->path,
'.');
236 $mapPath = mb_substr($this->path, 0, $minPathPos)
238 .mb_substr($this->path, $minPathPos);
243 if (!
$content || !$useMinimized || !$mapPath)
249 $mapUri =
'//# sourceMappingURL=';
250 if (mb_strpos(array_pop($parts), $mapUri) !== 0)
255 $mapUri .= WebPacker\Builder::getDefaultSiteUri() . $mapPath;
256 array_push($parts, $mapUri);
258 return implode(
"\n", $parts);