Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[AssetMapper] Fixing 2 bugs related to the compile command and importmaps #50231

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

Merged
merged 1 commit into from
May 5, 2023

Conversation

weaverryan
Copy link
Member

@weaverryan weaverryan commented May 3, 2023

Q A
Branch? 6.3
Bug fix? yes
New feature? no
Deprecations? none
Tickets none
License MIT
Doc PR not needed

Fixes 2 bugs:

A) Running assetmap:compile gives you a public/assets/importmap.json for fast importmap dumping on production. But, running assetmap:compile again later would re-use the importmap.json info to create the new importmap.json... meaning it would never update after the first compile.

B) The importmap process generates 2 pieces of information: (A) the importmap and (B) which files from the importmap should be preloaded. When we use assetmap:compile, we need to dump both pieces of info. So, we now also dump an importmap.preload.json file. These are TWO files (and not just one) because we avoid parsing importmap.json at runtime: we read the file and dump it straight out. We DO need to parse the "preload" file. So, I've kept them separate.

Blocked by #50219, which has some changes that will fix the tests here.

Cheers!

@fabpot
Copy link
Member

fabpot commented May 5, 2023

@weaverryan Can you rebase this PR now that #50219 is merged?

@nicolas-grekas
Copy link
Member

(rebase needed)

@weaverryan weaverryan force-pushed the asset-mapper-compile-fixes branch from bd3c42d to 329b413 Compare May 5, 2023 16:53
@weaverryan
Copy link
Member Author

Good to go now - thanks for the merges!

@nicolas-grekas nicolas-grekas force-pushed the asset-mapper-compile-fixes branch from 329b413 to f9f7274 Compare May 5, 2023 23:11
@nicolas-grekas
Copy link
Member

Thank you @weaverryan.

@nicolas-grekas nicolas-grekas merged commit ba94e95 into symfony:6.3 May 5, 2023
@weaverryan weaverryan deleted the asset-mapper-compile-fixes branch May 6, 2023 00:10
@fabpot fabpot mentioned this pull request May 7, 2023
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.

5 participants