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

Conversation

julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Feb 5, 2023

Description

This PR adds a new cdn.popper_esm config element used in "Using Bootstrap as a module" page to make this example works and consistent with https://github.com/twbs/examples/blob/main/sass-js-esm/index.html.

Another way would be to keep cdn.popper and to replace umd by esm on the fly thanks to a Hugo pipe or something.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • (N/A) I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Closes #37978

@julien-deramond julien-deramond marked this pull request as ready for review February 5, 2023 17:11
Copy link
Member

@mdo mdo left a comment

Choose a reason for hiding this comment

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

Thank you! Do we need to update anything in the ESM example in twbs/examples?

@julien-deramond
Copy link
Member Author

julien-deramond commented Feb 6, 2023

Do we need to update anything in the ESM example in twbs/examples?

sass-js-esm already uses the right ESM URL for Popper (source: https://github.com/twbs/examples/blob/12520213c9ca3d98f24f733af9d6da5503ce2108/sass-js-esm/index.html#L74) but we could update the version of Popper everywhere in the examples to use 2.11.6. Can do it.

Edit: done in twbs/examples#37

@@ -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.

@mdo mdo merged commit 68afebe into main Feb 14, 2023
@mdo mdo deleted the main-jd-fix-popper-esm-reference branch February 14, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Bootstrap as a module does not load Popper
2 participants