Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Use ESM Popper CDN reference in 'Using Bootstrap as a module' #38006

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ params:
js_bundle_hash: "sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
popper: "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
popper_hash: "sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3"
popper_esm: "https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/esm/popper.min.js"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@XhmikosR Is this solution OK for you as well? Or would you prefer another way by keeping only cdn.popper and to replace "umd" by "esm" on the fly thanks to a Hugo pipe or something where needed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving this for later if needed.


anchors:
min: 2
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.3/getting-started/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ To fix this, you can use an `importmap` to resolve the arbitrary module names to
<script type="importmap">
{
"imports": {
"@popperjs/core": "{{< param "cdn.popper" >}}",
"@popperjs/core": "{{< param "cdn.popper_esm" >}}",
"bootstrap": "https://cdn.jsdelivr.net/npm/bootstrap@{{< param "current_version" >}}/dist/js/bootstrap.esm.min.js"
}
}
Expand Down