Skip to content

Commit

Permalink
Merge pull request #856 from preactjs/config-debug
Browse files Browse the repository at this point in the history
Fix `debug: true` option in config file not being respected
  • Loading branch information
marvinhagemeister authored Sep 7, 2021
2 parents 87cfc7b + 69b4e1c commit 746d417
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-moles-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'wmr': patch
---

Fix `debug: true` option from config file not being set
4 changes: 2 additions & 2 deletions packages/wmr/src/lib/normalize-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export async function normalizeOptions(options, mode, configWatchFiles = []) {
options.cwd = resolve(options.cwd || '');
process.chdir(options.cwd);

if (options.debug) setDebugCliArg(true);

options.root = options.cwd;

options.plugins = [];
Expand Down Expand Up @@ -249,6 +247,8 @@ export async function normalizeOptions(options, mode, configWatchFiles = []) {
}
}

if (options.debug) setDebugCliArg(true);

debug('wmr:config')(options);

// @ts-ignore-next
Expand Down

0 comments on commit 746d417

Please sign in to comment.