Skip to content

Commit

Permalink
Pass optimizeDeps.include to silence build warning (#3507)
Browse files Browse the repository at this point in the history
* fix(build): pass `optimizeDeps.include` to silence build warning

* chore: add changeset
  • Loading branch information
natemoo-re authored Jun 2, 2022
1 parent d41540c commit cf2fb30
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-jars-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Silence noisy build warnings about `optimizeDeps.include`
8 changes: 8 additions & 0 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
logLevel: opts.viteConfig.logLevel ?? 'error',
mode: 'production',
css: viteConfig.css,
optimizeDeps: {
include: [...(viteConfig.optimizeDeps?.include ?? [])],
exclude: [...(viteConfig.optimizeDeps?.exclude ?? [])]
},
build: {
...viteConfig.build,
emptyOutDir: false,
Expand Down Expand Up @@ -234,6 +238,10 @@ async function clientBuild(
logLevel: 'info',
mode: 'production',
css: viteConfig.css,
optimizeDeps: {
include: [...(viteConfig.optimizeDeps?.include ?? [])],
exclude: [...(viteConfig.optimizeDeps?.exclude ?? [])]
},
build: {
emptyOutDir: false,
minify: 'esbuild',
Expand Down

0 comments on commit cf2fb30

Please sign in to comment.