Comments (2)
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.
from plasmo.
@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"],
from plasmo.
Related Issues (20)
- [BUG] I discovered tree shaking
- [BUG] "Cannot find module 'node:stream'" when use LuanRT / YouTube.js HOT 8
- Do I have to import in full tailwindcss antd daisyui in content.tsx
- [BUG] Sidepanel not autoreloading/auto-updating HOT 6
- [BUG] Why do I get an error when using react-native-svg? HOT 1
- [BUG] Incorrect CSS compilation HOT 1
- [EXP] Error: Example with-popup not found. You may file an example request at: https://docs.plasmo.com/exp
- [BUG] Cannot read properties of undefined (reading 'contextMenus') HOT 3
- [BUG] Error while installing the plasmo library
- [BUG] scss compilation changed the 'content' to '[]' unexpectedly HOT 1
- [BUG] Error "$RefreshSig$ is not a function" if I use `state` in a nested component HOT 2
- [BUG] plasmo dev yields 'indexOf' error
- [BUG] CSP restricted inline-style in Overlay CSUI.
- [BUG]Firefox add-on reviewed failed and offer a build report
- [RFC] Change shadow dom define name
- [BUG] Webpage with an element called 'process' broke Plasmo framework.
- [BUG] Cannot install packages on fresh install HOT 3
- [BUG] Unable to install plasmo via pnpm
- [BUG] CSP Restriction for TrustedTypePolicy Creation in Loading Indicator
- [BUG] Typescript Import Attributes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plasmo.