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 <roemers@zorgdomein.nl>
This commit is contained in:
Arnout Roemers 2021-06-23 20:12:06 +02:00 committed by GitHub
parent 0413b84c12
commit aefd5f71cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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']) {