Skip to content

Commit 746d417

Browse files
Merge pull request #856 from preactjs/config-debug
Fix `debug: true` option in config file not being respected
2 parents 87cfc7b + 69b4e1c commit 746d417

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/rare-moles-brush.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'wmr': patch
3+
---
4+
5+
Fix `debug: true` option from config file not being set

packages/wmr/src/lib/normalize-options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export async function normalizeOptions(options, mode, configWatchFiles = []) {
1717
options.cwd = resolve(options.cwd || '');
1818
process.chdir(options.cwd);
1919

20-
if (options.debug) setDebugCliArg(true);
21-
2220
options.root = options.cwd;
2321

2422
options.plugins = [];
@@ -249,6 +247,8 @@ export async function normalizeOptions(options, mode, configWatchFiles = []) {
249247
}
250248
}
251249

250+
if (options.debug) setDebugCliArg(true);
251+
252252
debug('wmr:config')(options);
253253

254254
// @ts-ignore-next

0 commit comments

Comments
 (0)