Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Provide integration with importmaps #48349

Copy link
Copy link
Closed
@nicolas-grekas

Description

@nicolas-grekas
Issue body actions

Import maps let you import JavaScript modules using logical names that map to versioned/digested files – directly from the browser.

Rails 7 supports them out of the box and I think it would be great to enable this experience in Symfony also, especially with the UX packages.

Importmaps enable building modern JavaScript applications using JavaScript libraries made for ES modules (ESM) without the need for transpiling or bundling. This frees you from needing Webpack, Yarn, npm, or any other part of the JavaScript toolchain.

That would be a great DX improvement for Symfony apps too!

Here is the gem that provides this to Rails 7, its README is a gem ;) : https://github.com/rails/importmap-rails/
And another article that gives some more hints about how this works internally: https://blog.appsignal.com/2022/03/02/import-maps-under-the-hood-in-rails-7.html

TL;DR, it looks like we "just" need a new command line + twig helper.

Of course, this would go with a few new conventions, that we might already have with the Symfony UX file layout, or that we might need to create.

kaznovac and apiv-thomaskaznovac

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.