Skip to content

Passing an UnlistedScriptDefinition to injectScript #1754

@ion1

Description

@ion1

Feature Request

It would be nice if the build system substituted the path of the script in the injectScript call as follows.

// main-injected.ts
export default defineUnlistedScript(/* ... */);
// isolated.content.ts
import mainInjected from "./main-injected";

export default defineContentScript({
  matches: ["https://example.net/*"],
  async main() {
    await injectScript(mainInjected);
  },
});

Thanks!

Is your feature request related to a bug?

N/A

What are the alternatives?

Keeping things as-is.

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions