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

Use Importmaps for admin JS #2498

Merged
merged 7 commits into from
Jun 29, 2023
Merged

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Jun 28, 2023

What is this pull request for?

Use importmap-rails to serve our admin ESM based JS.

Notable changes

Removes the @alchemy_cms/admin npm package and all related code. 🥳

In existing installations please run

bin/rake alchemy:upgrade

to remove all alchemy_admin package related code (and optionally webpacker)

Closes #2467

This allows us to get rid of the bundling of our npm module
and the necessity of bundling in the host app.
@tvdeyen tvdeyen added this to the 7.0 milestone Jun 28, 2023
Copy link
Contributor

@mamhoff mamhoff left a comment

Choose a reason for hiding this comment

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

WOW

@tvdeyen tvdeyen force-pushed the importmaps-support branch 2 times, most recently from 12ad2d3 to 38e5308 Compare June 28, 2023 13:10
We now serve the admin js via importmaps.
Look at this diff. Nothing else to add.
Follows Rails conventions and removes potential conflicts.
We only use it on the nodes page and do not need to make globally
available thanks to script type module \o/
This makes it easier to import individual modules
We pinned all JS files under app/javascript into importmap
and do not want to load test files.
@tvdeyen tvdeyen merged commit b4cbeba into AlchemyCMS:main Jun 29, 2023
@tvdeyen tvdeyen deleted the importmaps-support branch June 29, 2023 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in a new rails 7 app without esbuild
3 participants