From fb9ef4019bd5aec99972cac9bb82f2b6c259292c Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Tue, 28 Jun 2022 10:20:21 -0400 Subject: [PATCH] Fix: prevent sourcemap warnings in monorepo "dev" mode (#3744) * fix: avoid esbuild sourcemaps in astro-scripts dev * chore: changeset --- .changeset/eighty-turtles-drive.md | 5 +++++ scripts/cmd/build.js | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/eighty-turtles-drive.md diff --git a/.changeset/eighty-turtles-drive.md b/.changeset/eighty-turtles-drive.md new file mode 100644 index 000000000000..1c7749e3991a --- /dev/null +++ b/.changeset/eighty-turtles-drive.md @@ -0,0 +1,5 @@ +--- +'astro-scripts': patch +--- + +Fix: avoid generating sourcemaps for dev builds of the monorepo - prevents Vite warning logs diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js index de204becf41b..764b26eeda3d 100644 --- a/scripts/cmd/build.js +++ b/scripts/cmd/build.js @@ -12,7 +12,7 @@ const defaultConfig = { format: 'esm', platform: 'node', target: 'node14', - sourcemap: 'inline', + sourcemap: false, sourcesContent: false, }; @@ -61,7 +61,6 @@ export default async function build(...args) { if (!isDev) { await esbuild.build({ ...config, - sourcemap: false, bundle: false, entryPoints, outdir,