pixiebrix-extension
pixiebrix-extension copied to clipboard
Background worker: Use headers.json instead of parsing the registry at runtime
Would it be possible for the background page to import the pre-generated headers.json file instead of importing all the bricks and their dependencies at runtime?
This ~~complicates the build a bit (because it would require a pre-built file) but it~~ could greatly speed up the background and avoid all sorts of issues caused the transitive dependencies, like https://github.com/pixiebrix/pixiebrix-extension/pull/6774
How
- generate headers.json and add it to git
- add a very simple CI check to ensure that the generated file matches the contents of the repo
- add
import registry from '@/headers.json'where needed
Related
- https://github.com/pixiebrix/pixiebrix-extension/issues/4896
- loading headers.json should be easier than reworking the entire registry
- https://github.com/pixiebrix/pixiebrix-extension/issues/2156
- see the list of files here