Skip to content

Commit

Permalink
fix(task:purgecss): shallow clone purgecss options before purging
Browse files Browse the repository at this point in the history
  • Loading branch information
mohatt committed Apr 9, 2021
1 parent db5e3e9 commit 8f6d754
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/files/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export type IFileHtmlOptions = IExtensionOptions<{

const DEFAULTS = {
commons: {
style: ['gatsby-global-css']
style: ['gatsby-global-css'],
script: ['gatsby-chunk-mapping']
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/tasks/purgecss/lib/purger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Purger {
return cache.rejected
}

const opts = this.purgeOptions
const opts = { ...this.purgeOptions }
opts.content = []
opts.css = []
try {
Expand Down

0 comments on commit 8f6d754

Please sign in to comment.