Skip to content

Commit

Permalink
Merge pull request #275 from serverless-stack/feature-bundle-loglevel
Browse files Browse the repository at this point in the history
Configure esbuild logLevel based on the `verbose` flag
  • Loading branch information
fwang committed Mar 25, 2021
2 parents 06ccfeb + cbc84d7 commit 7325351
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/cli/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ async function transpile(srcPath, handler, bundle) {
target: [getEsbuildTarget()],
color: process.env.NO_COLOR !== "true",
outdir: path.join(paths.appPath, outSrcPath),
logLevel: process.env.DEBUG ? "warning" : "error",
};

builderLogger.debug(`Transpiling ${handler}...`);
Expand Down
1 change: 1 addition & 0 deletions packages/cli/scripts/util/cdkHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ async function transpile(cliInfo) {
sourcemap: true,
platform: "node",
outdir: buildDir,
logLevel: process.env.DEBUG ? "warning" : "error",
entryPoints: [entryPoint],
target: [getEsbuildTarget()],
tsconfig: isTs ? tsconfig : undefined,
Expand Down
1 change: 1 addition & 0 deletions packages/resources/src/util/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export function builder(builderProps: BuilderProps): BuilderOutput {
entryPoints: [entryPath],
color: process.env.NO_COLOR !== "true",
tsconfig: hasTsconfig ? tsconfig : undefined,
logLevel: process.env.DEBUG ? "warning" : "error",
});
}

Expand Down

0 comments on commit 7325351

Please sign in to comment.