WXT "wxt zip" build / packaging failed in CI
wxt zip first runs wxt build, then packs the output. It fails when the build errors, or when a Firefox sources zip references files the configured includes do not cover.
What this error means
The wxt zip step fails with a build error, or with a message that files outside the project root are required for the sources zip.
wxt
ERROR Command failed: wxt build
ERROR The following files are imported but not included in the sources zip.
Add them to "zip.includeSources" in wxt.config.ts.Common causes
The underlying build failed
wxt zip cannot pack output that wxt build did not produce; the real error is the build failure above.
Sources zip is missing required files
For Firefox, WXT builds a reproducible sources zip; files outside the configured includes are flagged.
How to fix it
Fix the build, then zip
- Run
wxt buildalone and resolve the reported error. - Once the build succeeds, run
wxt zip. - Check the produced zip exists in
.output.
Terminal
wxt build
wxt zipInclude the required sources
Add the flagged files to the sources zip configuration so the Firefox sources package is complete.
wxt.config.ts
// wxt.config.ts
export default defineConfig({
zip: { includeSources: ['shared/**'] },
});How to prevent it
- Run
wxt buildbeforewxt zipin CI. - Keep
zip.includeSourcescovering shared files. - Verify the output zip exists after packaging.
Related guides
Plasmo "plasmo build" failed in CIFix "plasmo build" failures in CI - the Plasmo framework build aborts on a missing entry, a bad manifest over…
CRXjs "ManifestV3 schema" / invalid manifest input in CIFix CRXjs (@crxjs/vite-plugin) manifest errors in CI - the plugin validates your manifest against the MV3 sch…
web-ext build "Artifact already exists" / overwrite in CIFix web-ext build "Artifact ... already exists" in CI - a previous artifact of the same name is present and w…