Skip to content

Commit

Permalink
Enable purging when --purge option is supplied in CLI (#4772)
Browse files Browse the repository at this point in the history
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 <roemers@zorgdomein.nl>
  • Loading branch information
aroemers and Arnout Roemers committed Jun 23, 2021
1 parent 0413b84 commit aefd5f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cli.js
Expand Up @@ -420,7 +420,10 @@ async function build() {
let resolvedConfig = resolveConfigInternal(config)

if (args['--purge']) {
resolvedConfig.purge = args['--purge'].split(/(?<!{[^}]+),/)
resolvedConfig.purge = {
enabled: true,
content: args['--purge'].split(/(?<!{[^}]+),/),
}
}

if (args['--jit']) {
Expand Down

0 comments on commit aefd5f7

Please sign in to comment.