Production Build: MV3 Service Worker Can't Load Code-Split Chunks
Hey everyone
I'm running into an MV3 service worker issue with Plasmo v0.90.5. When using libraries like XState, Parcel splits the background script into multiple chunks during the production build (e.g., handlers..js). Chrome MV3 service workers run in classic mode unless "type": "module" is set, but Plasmo regenerates the entire background section and doesn’t allow overriding background.type. As a result, the service worker can’t load the split chunks and throws Cannot find module 'handlers..js'.
Is there a supported way in Plasmo to prevent code-splitting for the background worker or to mark the background as a module?
0 Replies