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

Add mvnpm support in webjar-locator #39963

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

phillip-kruger
Copy link
Member

@phillip-kruger phillip-kruger commented Apr 9, 2024

This PR adds support for mvnpm in the webjar-locator extension.
As discussed, we probably need to rename the extension.

In this PR:

  • mvnpm libraries can now also be referenced directly without needing the version in the url, example: <script src="_static/bootstrap/dist/js/bootstrap.min.js"></script> in the html.
  • mvnpm libraries can also now be used with an importmap. The importmap can be added to the html: <script src="/_importmap/generated_importmap.js"></script>
  • With the importmap, any library can then be use with imports : <script type="module">import '@vaadin/date-picker';</script>
  • User can also map their own folder/files to be included with the importmap. This can be done with config. Example: quarkus.web-jar-locator.import-mappings.app/ = /app/ . Then it can be use example: <script type="module">import 'app/demo-app.js';</script>
  • Because the user might only use importmaps and only mvnpm, there is also now an option to turn off the version reroute, as this will not be needed when using importmaps
    Once this PR is merged and the rename has happened, we still need to update the documentation to include above.

mvnpm-locator

Screenshot_20240409_214856

@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@phillip-kruger phillip-kruger force-pushed the mvnpm-webjar-locator branch 2 times, most recently from 08ef520 to 6f2dc41 Compare April 10, 2024 07:58
Signed-off-by: Phillip Kruger <phillip.kruger@gmail.com>
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 10, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit fd1168a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

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

Thanks @phillip-kruger :)

@ia3andy ia3andy merged commit 7fd3cde into quarkusio:main Apr 10, 2024
19 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.10 - main milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants