-
Notifications
You must be signed in to change notification settings - Fork 57
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
Generated an empty chunk: "popup", overwrites a previously emitted file of the same name #48
Comments
NOTE: in case it is helpful - I am also using some other deps, so I suppose it is possible something else is involved here too... nothing feels out of the ordinary though:
And
|
More bad-ish news (for me). I migrated to using the budding/beta |
Ugh. After all the digging I did, starting a repository from scratch is not illustrating this behavior... 😭 Through a bunch of diffing / tweaking / comparing, the issue came down to this benign-looking line in my
BEWARE the Here is a trimmed down example - latest commit breaks in this way: https://github.com/colearendt/extensions-example |
Sorry this was so hard to debug! I have no idea why I can forcefully ignore that option inside the plugin, but that might cause issues for someone else down the line who knows how to use that field properly. Instead, if this happens to anyone else, hopefully they can find this issue and the solution works for them. // vite.config.ts
export default defineConfig({
...
- assetsInclude: someValue,
}); Let me know if you have any other problems! |
Thanks, I think that sounds like the right call too! My extension is now happy and healthy - thanks again for the great package! Part of it feels like this may be a bug in |
Just a note that this issue was fixed upstream in vite! 🎉 |
Nice! |
Hello. This package has been a huge help! However, I am running into an issue right near what I presume is the finish line in getting my extension migrated to
vite
. Unfortunately, I am having a very difficult time figuring out where the root problem is at.TL;DR;
popup.popup.html
is getting built twice. Once atpopup.html
with expected contents, and once atpopup/popup.html
with "empty" / placeholder contents. If I flatten the folder structure, the latter / useless one wins.Directory structure:
manifest.json
(essentially the same as this e2e test... which works for me... but I still cannot get my plugin to):
vite-plugin-web-extension/packages/e2e/e2e.test.ts
Lines 69 to 77 in 2517ce0
build log
Note that there are two output
popup.html
files... one with my actual contents (dist/popup.html
) and another (dist/popup/popup.html
) with contents:export default "/popup.html"
.Unfortunately, the path pointed to by the extension is
popup/popup.html
, so my extension is not usable. No foray through several iterations ofadditionalInputs
, different file structures, verbose logging, rollup options, etc. have been helpful. Further, if I change or flatten the folder structure, it seems that the blankpopup.html
is generated last / wins with a message"popup.html" overwrites a previously emitted file of the same name
.I have tried different versions of vite in the 3.0 line, and it seems to affect both 3.1 and 3.2. I have seen some related-ish looking activity on vite lately though - maybe I will try the e2e tests with newer versions of deps.
vitejs/vite#9928
Any ideas how to keep debugging / resolve this "double build" issue?
The text was updated successfully, but these errors were encountered: