diff options
author | 2022-06-28 10:20:21 -0400 | |
---|---|---|
committer | 2022-06-28 10:20:21 -0400 | |
commit | fb9ef4019bd5aec99972cac9bb82f2b6c259292c (patch) | |
tree | ed3a358b3c36415a28a455a43f2263169b326418 | |
parent | 855b1daba96357d76b5fb261992d1e69bdaa09a5 (diff) | |
download | astro-fb9ef4019bd5aec99972cac9bb82f2b6c259292c.tar.gz astro-fb9ef4019bd5aec99972cac9bb82f2b6c259292c.tar.zst astro-fb9ef4019bd5aec99972cac9bb82f2b6c259292c.zip |
Fix: prevent sourcemap warnings in monorepo "dev" mode (#3744)
* fix: avoid esbuild sourcemaps in astro-scripts dev
* chore: changeset
-rw-r--r-- | .changeset/eighty-turtles-drive.md | 5 | ||||
-rw-r--r-- | scripts/cmd/build.js | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.changeset/eighty-turtles-drive.md b/.changeset/eighty-turtles-drive.md new file mode 100644 index 000000000..1c7749e39 --- /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 de204becf..764b26eed 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, |