0

Thanks for the help!

So I have those two js files that I am injecting I would like to know how can I make the content.js import the functions js file I need to do that, couse the content.js file is just too long

`

chrome.action.onClicked.addListener(
    (tab) => {
        chrome.scripting.executeScript({
            target: {tabId: tab.id},
            files: ["scripts/content.js", "scripts/functions.js"],
        });
    }
    
);

`

I have tried using import but I get the following message:

Cannot use import statement outside a module

0 Answers0