What happened?
Description
I am trying to register assets in my plugin -which require yii2-adapter - by calling $view->registerAssetBundle(...) for frontend requests in the plugin’s init() method, but the assets are not included in the rendered page.
I can confirm that the init() method of the asset bundle is being called, but the asset resources themselves are not added to the frontend output.
I also tested the same approach with a CP request and got the same behavior.
if (!Craft::$app->getRequest()->getIsConsoleRequest() && !Craft::$app->getRequest()->getIsCpRequest() && $settings->registerCounter) {
$view->registerAssetBundle(CounterAsset::class);
}
Craft CMS version
6.0.0-alpha.16
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
I am trying to register assets in my plugin -which require yii2-adapter - by calling
$view->registerAssetBundle(...)for frontend requests in the plugin’s init() method, but the assets are not included in the rendered page.I can confirm that the init() method of the asset bundle is being called, but the asset resources themselves are not added to the frontend output.
I also tested the same approach with a CP request and got the same behavior.
Craft CMS version
6.0.0-alpha.16
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions