Pass optimizeDeps.include
to silence build warning (#3507)
* fix(build): pass `optimizeDeps.include` to silence build warning * chore: add changeset
This commit is contained in:
parent
d41540cc77
commit
cf2fb3004e
2 changed files with 13 additions and 0 deletions
5
.changeset/hip-jars-swim.md
Normal file
5
.changeset/hip-jars-swim.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Silence noisy build warnings about `optimizeDeps.include`
|
|
@ -152,6 +152,10 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
|
||||||
logLevel: opts.viteConfig.logLevel ?? 'error',
|
logLevel: opts.viteConfig.logLevel ?? 'error',
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
css: viteConfig.css,
|
css: viteConfig.css,
|
||||||
|
optimizeDeps: {
|
||||||
|
include: [...(viteConfig.optimizeDeps?.include ?? [])],
|
||||||
|
exclude: [...(viteConfig.optimizeDeps?.exclude ?? [])]
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
...viteConfig.build,
|
...viteConfig.build,
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
|
@ -234,6 +238,10 @@ async function clientBuild(
|
||||||
logLevel: 'info',
|
logLevel: 'info',
|
||||||
mode: 'production',
|
mode: 'production',
|
||||||
css: viteConfig.css,
|
css: viteConfig.css,
|
||||||
|
optimizeDeps: {
|
||||||
|
include: [...(viteConfig.optimizeDeps?.include ?? [])],
|
||||||
|
exclude: [...(viteConfig.optimizeDeps?.exclude ?? [])]
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
emptyOutDir: false,
|
emptyOutDir: false,
|
||||||
minify: 'esbuild',
|
minify: 'esbuild',
|
||||||
|
|
Loading…
Reference in a new issue