public function hotAsset($path, $hot = true)
    {
        $assets = $this->getWebpackAssets();
        $assetName = pathinfo($path, PATHINFO_FILENAME);

        if (!isset($assets[$assetName])) {
            $assetNames = implode("\n", array_keys($assets));

            throw new \Exception(
                "Cannot find asset '{$assetName}' in webpack stats. Found:\n{$assetNames})"
            );
        }

        if ('dev' === $this->environment && $hot) {
            // for dev serve fill from webpack-dev-server
            return 'http://localhost:8080/dist/'.$assets[$assetName]['js'];
        }

        // otherwise serve static generated files
        return $this->assetExtension->getAssetUrl(
            'dist/'.$assets[$assetName]['js']
        );
    }