I am trying to import functions and primitives (using modules) from my index.js file onto background.js for a Google extension that I'm making, but then it hits me with "Service worker registration failed. Status code: 15" as soon as I do so. Removing that section 'import { searchTransform, inputLang} from "./index.js";' immediately gets me "worker service active". I have tried playing around with changing the tag properties; I added "module" to my manifest and on the html file. I updated chrome to the most recent version.
Asked
Active
Viewed 4,167 times
3
-
[How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Norio Yamamoto Jan 17 '23 at 04:05
-
Please provide enough code so others can better understand or reproduce the problem. – Community Jan 17 '23 at 08:04
-
1This code means the script has an error. A typical mistake is using `window` or `document` or `eval`. – wOxxOm Jan 17 '23 at 08:29
-
2In my case, https://stackoverflow.com/a/70843507/3809427 is the solution. – Loran Mar 27 '23 at 11:10