Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
next-font-manifest-plugin
(#51835)
## Background Currently we're track all imported CSS modules by an entry, in the client manifest: ```js // client manifest { entryCSSFiles: { 'app/entry_name': { modules: ['app/foo.css', ...] } } } ``` And then, in the font manifest we track all emitted assets (fonts) by each CSS module: ```js // font manifest { app: { 'app/foo.css': [ 'static/font/abc.woff', ... ] } } ``` These two fields are only used together by `get-preloadable-fonts.tsx`, so it can know which font files need to be preloaded for this entry. (Although previously we use `.modules` for something else, but it's gone now) ## Changes Since we only need the font assets per entry, it's unnecessary to track these in the module level and then join them together. This PR removes the `modules` field from the client manifest, and changes the font manifest to directly keep the entry—font mapping. This gets rid of one module traversal from the client manifest plugin.
- Loading branch information
Showing
8 changed files
with
73 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters