Open iomjympq99190 opened 5 months ago
The global context of each content script is independent and it is not possible to access functions across contexts.
This is determined by the extension architecture and has nothing to do with plasmo, which the Chrome Extension Document calls isolated worlds.
So if you have 10 content scripts, and all 10 content scripts reference the same library, plasmo must bundle that library in every generated content script.
@aiktb But you can create a shared bundle and then reference this shared bundle in the content_scripts of each script in order.
"js": ["js/chunk-vendors.js", "js/content.js"],
What is the example you wish to see?
When I have over 10 content files, only the ones that have been packaged are very large. Why isn't there a packaging configuration file that extracts public libraries into global variables and reuses them
Is there any context that might help us understand?
No response
Code of Conduct