Closed insthync closed 1 year ago
I've temporarily avoided this issue by following instructions in https://github.com/yiisoft/yii2-bootstrap5/blob/master/docs/guide/assets-setup.md -> Using CDN section
By add
'assetManager' => [
// override bundles to use CDN :
'bundles' => [
'yii\bootstrap5\BootstrapAsset' => [
'sourcePath' => null,
'baseUrl' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.1/dist/',
'css' => [
'css/bootstrap.min.css'
],
],
'yii\bootstrap5\BootstrapPluginAsset' => [
'sourcePath' => null,
'baseUrl' => 'https://cdn.jsdelivr.net/npm/bootstrap@5.1/dist/',
'css' => [
'css/bootstrap.min.css'
],
'js' => [
'js/bootstrap.bundle.min.js'
],
],
],
],
to config/web.php
(in components
)
Seems to be related to #9741, ran into the same issue just the other way around (js files not present).
You can also override the publishOptions
in the application config to work around this:
'assetManager' => [
'bundles' => [
'yii\bootstrap5\BootstrapAsset' => [
'publishOptions' => ['only' => ['dist/js/bootstrap.bundle.*', 'dist/css/bootstrap.*']],
],
'yii\bootstrap5\BootstrapPluginAsset' => [
'publishOptions' => ['only' => ['dist/js/bootstrap.bundle.*', 'dist/css/bootstrap.*']],
],
],
],
This is caused by #52. Best solution for now is to pin your dependency to version 2.0.3
I think it's caused by the only
clauses. Rolled back this change
What steps will reproduce the problem?
Set
$depends
inAppAsset
toWhat is the expected result?
Having bootstrap css files in
assets
folderWhat do you get instead?
No css files
Additional info