+ hmr assets from webpack encore dev-server supports

This commit is contained in:
2022-03-19 19:01:54 +03:00
parent 829231a79f
commit a35faa558c
4 changed files with 37 additions and 5 deletions

View File

@ -1,6 +1,7 @@
<?php namespace Wpstudio\Assetsmanifest\Components;
use Cms\Classes\ComponentBase;
use Cms\Classes\Theme;
use Wpstudio\AssetsManifest\Classes\ManifestReader;
class Manifest extends ComponentBase
@ -26,6 +27,7 @@ class Manifest extends ComponentBase
'validationPattern' => '^[^/].*/manifest.json',
'validationMessage' => self::LANG_PREFIX . 'properties.path.validationMessage',
'placeholder' => 'assets/build/manifest.json',
'default' => 'assets/build/manifest.json',
'showExternalParam' => false,
'required' => true,
]
@ -49,7 +51,7 @@ class Manifest extends ComponentBase
*/
private function prepareVars(): void
{
$this->manifestReader = new ManifestReader(base_path($this->property('path')));
$this->manifestReader = new ManifestReader(Theme::getActiveTheme()->getPath() . '/' . $this->property('path'));
}
public function getManifestReader(): ManifestReader