Fix: prevent sourcemap warnings in monorepo "dev" mode (#3744)

* fix: avoid esbuild sourcemaps in astro-scripts dev

* chore: changeset
This commit is contained in:
Ben Holmes 2022-06-28 10:20:21 -04:00 committed by GitHub
parent 855b1daba9
commit fb9ef4019b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro-scripts': patch
---
Fix: avoid generating sourcemaps for dev builds of the monorepo - prevents Vite warning logs

View file

@ -12,7 +12,7 @@ const defaultConfig = {
format: 'esm', format: 'esm',
platform: 'node', platform: 'node',
target: 'node14', target: 'node14',
sourcemap: 'inline', sourcemap: false,
sourcesContent: false, sourcesContent: false,
}; };
@ -61,7 +61,6 @@ export default async function build(...args) {
if (!isDev) { if (!isDev) {
await esbuild.build({ await esbuild.build({
...config, ...config,
sourcemap: false,
bundle: false, bundle: false,
entryPoints, entryPoints,
outdir, outdir,