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

Introduce importmap-rails for JavaScript dependency management #3399

Closed
mshibuya opened this issue Oct 2, 2021 · 4 comments
Closed

Introduce importmap-rails for JavaScript dependency management #3399

mshibuya opened this issue Oct 2, 2021 · 4 comments
Assignees

Comments

@mshibuya
Copy link
Member

mshibuya commented Oct 2, 2021

It will be the default way from Rails 7.
https://world.hey.com/dhh/rails-7-will-have-three-great-answers-to-javascript-in-2021-8d68191b

@mshibuya mshibuya added this to the 3.0.0 milestone Oct 2, 2021
@mshibuya mshibuya self-assigned this Oct 2, 2021
@mshibuya
Copy link
Member Author

To take advantage of importmap-rails we need to upgrade our dependencies to the ESM-compatible version, which is not the case for many of our current dependencies. Since importmap-rails-based apps can work perfectly with current asset-pipeline-based RailsAdmin, I decided not to do this for now.

But we want to explore a better way to manage our asset dependency. Current practice of vendorizing dependencies is bad and makes dependency upgrade painful. We will be able to consider introducing importmap-rails again when JavaScript dependencies are upgraded in the future.

@mshibuya mshibuya removed this from the 3.0.0 milestone Oct 19, 2021
@mshibuya mshibuya changed the title Support importmap-rails Introduce importmap-rails for JavaScript dependency management Oct 19, 2021
@brunoprietog
Copy link

Hello, is there any news about this? I am using Rails 7 and propshaft instead of sprockets as my asset pipeline and I get an error on installation because sprockets is required.

Thanks!

@mshibuya
Copy link
Member Author

mshibuya commented Feb 9, 2022

I realized that this is possible now, after upgrading Bootstrap to 5 we now have no ESM-incompatible dependencies.
I'll try to see if it works or not soon.

mshibuya added a commit that referenced this issue Feb 25, 2022
mshibuya added a commit that referenced this issue Feb 25, 2022
mshibuya added a commit that referenced this issue Feb 25, 2022
mshibuya added a commit that referenced this issue Feb 25, 2022
mshibuya added a commit that referenced this issue Feb 25, 2022
mshibuya added a commit that referenced this issue Feb 26, 2022
mshibuya added a commit that referenced this issue Feb 27, 2022
mshibuya added a commit that referenced this issue Feb 27, 2022
mshibuya added a commit that referenced this issue Feb 27, 2022
mshibuya added a commit that referenced this issue Mar 1, 2022
mshibuya added a commit that referenced this issue Mar 12, 2022
mshibuya added a commit that referenced this issue Jun 12, 2022
@jessenovotny
Copy link

Is there a corrected rails_admin:install command to work with importmap?

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

No branches or pull requests

3 participants