I'm recently learning chrome extension development, and find out that: When I use
import { foo } from "./index"
in background.js, I will get an error: An unknown error occurred when fetching the script.,
while using
import { foo } from "./index.js"
Everything just works properly. Could someone please tell me the difference between these two ways?