Remove false-positive warnings from Cloudflare's build (#6531)

This commit is contained in:
Matthew Phillips 2023-03-13 10:05:54 -04:00 committed by GitHub
parent 637f9bc728
commit 4ddf348938
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,7 @@
---
'@astrojs/cloudflare': patch
---
Remove false-positive warnings from Cloudflare's build.
Cloudflare includes warnings when it bundles the already-built output from astro.build. Those warnings are mostly due to `"sideEffects": false` packages that are included in the Vite built output because they are marked as external. Rollup will remove unused imports from these packages but will not remove the actual import, causing the false-positive warning.

View file

@ -107,6 +107,9 @@ export default function createIntegration(args?: Options): AstroIntegration {
banner: {
js: SHIM,
},
logOverride: {
'ignored-bare-import': 'silent'
},
});
// Rename to worker.js