Skip to content

Commit

Permalink
fix: proper optional plugin syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vpicone committed Sep 21, 2020
1 parent 304fc29 commit 6ffcdf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gatsby-theme-carbon/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = (themeOptions) => {
isServiceWorkerEnabled = false,
} = themeOptions;

const optionalPlugins = [isServiceWorkerEnabled && `gatsby-plugin-offline`];
const optionalPlugins = [];

if (mediumAccount) {
optionalPlugins.push({
Expand All @@ -38,6 +38,10 @@ module.exports = (themeOptions) => {
});
}

if (isServiceWorkerEnabled) {
optionalPlugins.push(`gatsby-plugin-offline`);
}

const defaultRemarkPlugins = [
{ resolve: `gatsby-remark-unwrap-images` },
{ resolve: `gatsby-remark-smartypants` },
Expand Down

0 comments on commit 6ffcdf5

Please sign in to comment.