Closed carterworks closed 1 year ago
additionalInputs
should be relative to the Vite root, not an absolute path. Try this instead:
https://v1.vite-plugin-web-extension.aklinker1.io/guide/configuration.html#additional-inputs
additionalInputs: ["src/app/index.html", "src/login/login.html"],
LMK if that doesn't work, I'll be able to look into this in a few hours when I get back home.
Changing additionalInputs
to a relative path fixed the error message about entry file names, but the infinite loop is still there for vite build
(without --watch
).
Any tips?
I've seen the infinite loop before, it showed up while working on v2 of the extension. That was related to how plugins are managed in each build.
I haven't seen it happen in v1. Can you reproduce it in a minimal repo?
I haven't seen it happen in v1. Can you reproduce it in a minimal repo?
Sure. Here is a minimal reproduction that loops on my machine.
https://github.com/carterworks/webext-vite-infinite-loop
Video of the loop:
I've figured out the issue and released an update, v1.4.7
that fixes the issue.
@carterworks
That works. You're the best. Thanks for the quick resolution.
I'm trying to migrate an existing extension to vite using this plugin.
However, when I run
vite build
, I get the following outputFull output
Error
After that error is printed, the build process starts over again and loops forever until it runs out of heap space.
How can I resolve this error? Any guidance is greatly appreciated.
vite.config.ts
Project structure