Skip to content

Commit

Permalink
Remove false-positive warnings from Cloudflare's build
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp committed Mar 13, 2023
1 parent f55b482 commit 2f09071
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/fair-emus-taste.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions packages/integrations/cloudflare/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export default function createIntegration(args?: Options): AstroIntegration {
banner: {
js: SHIM,
},
logOverride: {
'ignored-bare-import': 'silent'
},
});

// Rename to worker.js
Expand Down

0 comments on commit 2f09071

Please sign in to comment.