aherod
PD🧩 Plasmo Developers
•Created by Wellington Capoia on 8/14/2023 in #👟framework
How to use a component library on Contents?
@lab But using onBeforeMount hook is still some workaround. Are there any other solutions or working examples of using any plugin/library within the contents files?
22 replies
PD🧩 Plasmo Developers
•Created by Wellington Capoia on 8/14/2023 in #👟framework
How to use a component library on Contents?
I've encountered the same issue when using a plugin within the contents files. It works in popup, newtab but not in the contents. I've tried different approaches with defineOptions and "prepare" fn, but none work. I also tried using app instance like so:
onBeforeMount(() => {
const app = getCurrentInstance()?.appContext.app;
app.use(MyPlugin);
})
but it makes a new error: "Uncaught (in promise) Error: Cannot find module '8Wl7u' at newRequire"
@lab any suggestions on how to make the plugin work in contents?
22 replies