Skip to content

Comments

[AssetMapper] Clarify dynamic import behavior#22013

Open
lacatoire wants to merge 2 commits intosymfony:7.4from
lacatoire:docs/clarify-dynamic-imports
Open

[AssetMapper] Clarify dynamic import behavior#22013
lacatoire wants to merge 2 commits intosymfony:7.4from
lacatoire:docs/clarify-dynamic-imports

Conversation

@lacatoire
Copy link
Contributor

@lacatoire lacatoire commented Feb 18, 2026

This clarifies the note about dynamic imports in the AssetMapper documentation.

Fixes #22012

The previous wording implied that AssetMapper doesn't work with dynamic
imports, which is misleading. AssetMapper does rewrite dynamic imports
when the path is a string literal. The actual limitation is that the
es-module-shims polyfill only shims import map support, not the import()
syntax itself — which is a native JS feature unsupported in very old
browsers (mainly IE 11).

Also add a note about transpilation order: transpilers must run before
AssetMapper compilation to avoid breaking versioned URLs.
@carsonbot
Copy link
Collaborator

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update the PR base branch to target one of these branches instead? 6.4, 7.4, 8.0, 8.1.

Cheers!

Carsonbot

@carsonbot carsonbot added this to the 7.3 milestone Feb 18, 2026
@carsonbot carsonbot changed the title Clarify dynamic import behavior in AssetMapper docs Clarify dynamic import behavior in AssetMapper docs Feb 18, 2026
@OskarStark OskarStark modified the milestones: 7.3, 7.4 Feb 20, 2026
@OskarStark
Copy link
Contributor

Please change target branch to 7.4, if a feature (like this one) was introduced in 7.3. We don't maintain the code, nor the docs of 7.3 anymore. That said, the version added should always be the correct one, like 7.3 here. Thank you

@OskarStark OskarStark changed the title Clarify dynamic import behavior in AssetMapper docs [AssetMapper] Clarify dynamic import behavior Feb 20, 2026
@lacatoire lacatoire changed the base branch from 7.3 to 7.4 February 20, 2026 11:32
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.

Clarify dynamic import() behavior and transpiler order in AssetMapper, using browser-centric flow

3 participants