Get manifest target in code?
# support-framework
f
Get manifest target in code?
Hey, my code needs to know if its currently running with mv2 or mv3 as a target to use the correct API. Is there a way to get the current target options from the content script, popup etc.? Something like:
plasmo build --target=firefox-mv2
Copy code
js
// contents.ts
process.env.plasmo_target.browser // = "firefox"
process.env.plasmo_target.manifestVersion // = "mv2"