Open pasikonik opened 3 years ago
I'm wondering, how can I set script file for executeScipt?
browser.tabs.executeScript(null, { file: 'script.js' }, (result) => { ... });
Is it require different build with separated file or is it possible to do it in a simpler way?
My current workaround looks like this:
import { bodyOfMethod } from '@/js/script' browser.tabs.executeScript(null, { code: `(${bodyOfMethod})()` }, (result) => { ... });
but it looks hacky to me.
I'm wondering, how can I set script file for executeScipt?
Is it require different build with separated file or is it possible to do it in a simpler way?
My current workaround looks like this:
but it looks hacky to me.