Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@crxjs/vite-plugin will break the build if build.rollupOptions.inputs added #876

Open
1 of 2 tasks
jurijsk opened this issue Mar 31, 2024 · 0 comments
Open
1 of 2 tasks

Comments

@jurijsk
Copy link

jurijsk commented Mar 31, 2024

Build tool

Vite

Where do you see the problem?

  • In the browser
  • In the terminal

Describe the bug

@crxjs/vite-plugin will break Typescript project build if build.rollupOptions.inputs added, because pluginFileWriter strips all plugins except .startsWith("crx:") and rollup does not like it.

Why do I have to add additional entry point?

Because I want to use browser.scripting.executeScript on user action, so I need to compile and emit a file that isn't mentioned in manifest.json.

Workaround:
and it as content_scripts with with matches ftp://with-match-that-will-never-match.lv

Reproduction

Add another entry point to build.rollupOptions.inputs vite config

Logs

No response

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
    Memory: 16.76 GB / 31.71 GB
  Binaries:
    Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.8.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.65), ChromiumDev (123.0.2420.10)
    Internet Explorer: 11.0.19041.3636

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant