You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the extension as a child to another project, kind of like a monorepo. The problem is that when I zip for Firefox it only includes the source files for the extension, but not files that the extension imports from the parent (or sibling) project. A possible way to do this might be; since Vite/Rollup should be aware of which files actually end up in the compiled output, zip could follow the paths and add those files.
Is your feature request related to a bug?
"N/A"
What are the alternatives?
Adding the files manually via defineConfig({ zip: {} }) which is very tedious and doesn't scale.
Additional context
"N/A"
The text was updated successfully, but these errors were encountered:
If you're using a "package based" momorepo, not an integrated monorepo, vite is not aware of the sources of other local packages your extension depends on, only the already transpiled files of those packages. So no, there is no way for WXT to guarantee it will find all the files it needs.
You will have to tell it which files to zip. Config for controlling the root directory that is zipped already exists: zip.sourcesRoot. Then you can use glob patterns in zip.includeSources and zip.excludeSources.
Or, if you know vite is able to detect all the source files correctly in your project, you can dynamically generate the list yourself by hooking into the build process and changing which files get zipped. This can be done in a WXT module.
if you know vite is able to detect all the source files correctly in your project, you can dynamically generate the list yourself by hooking into the build process and changing which files get zipped. This can be done in a WXT module.
Exactly. That's what I'm proposing for WXT to support natively. This wouldn't just help people with (integrated) monorepos, but it would also save people from having to manually delete all the files the don't need in the zipped source code.
Feature Request
I added the extension as a child to another project, kind of like a monorepo. The problem is that when I
zip
for Firefox it only includes the source files for the extension, but not files that the extension imports from the parent (or sibling) project. A possible way to do this might be; since Vite/Rollup should be aware of which files actually end up in the compiled output,zip
could follow the paths and add those files.Is your feature request related to a bug?
"N/A"
What are the alternatives?
Adding the files manually via
defineConfig({ zip: {} })
which is very tedious and doesn't scale.Additional context
"N/A"
The text was updated successfully, but these errors were encountered: