It turns out I have to build the extension with hoist
flag.
plasmo build --target=firefox-mv3 --hoist
The docs say hoisting can break the dependency:
Note that hoisting can potentially break your dependency, especially those that import dynamic dependency via a plugin system. However, hoisting can significantly improve the bundling speed and reduce the size of your bundle.
Ironically, not hoisting breaks my extension.