Skip to content

Commit aefd5f7

Browse files
aroemersArnout Roemers
and
Arnout Roemers
authored
Enable purging when --purge option is supplied in CLI (#4772)
Do not require NODE_ENV to be set to 'production' as well, as using the --purge option in the CLI should be explicit enough. Co-authored-by: Arnout Roemers <[email protected]>
1 parent 0413b84 commit aefd5f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cli.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ async function build() {
420420
let resolvedConfig = resolveConfigInternal(config)
421421

422422
if (args['--purge']) {
423-
resolvedConfig.purge = args['--purge'].split(/(?<!{[^}]+),/)
423+
resolvedConfig.purge = {
424+
enabled: true,
425+
content: args['--purge'].split(/(?<!{[^}]+),/),
426+
}
424427
}
425428

426429
if (args['--jit']) {

0 commit comments

Comments
 (0)