diff --git a/src/files/html.ts b/src/files/html.ts
index eb2ede9..6205f5e 100644
--- a/src/files/html.ts
+++ b/src/files/html.ts
@@ -14,7 +14,8 @@ export type IFileHtmlOptions = IExtensionOptions<{
const DEFAULTS = {
commons: {
- style: ['gatsby-global-css']
+ style: ['gatsby-global-css'],
+ script: ['gatsby-chunk-mapping']
}
}
diff --git a/src/tasks/purgecss/lib/purger.ts b/src/tasks/purgecss/lib/purger.ts
index 5f5aa1f..1bd0310 100644
--- a/src/tasks/purgecss/lib/purger.ts
+++ b/src/tasks/purgecss/lib/purger.ts
@@ -83,7 +83,7 @@ export class Purger {
return cache.rejected
}
- const opts = this.purgeOptions
+ const opts = { ...this.purgeOptions }
opts.content = []
opts.css = []
try {