Skip to content

Unable to overwrite themeStorageKey valueΒ #3

@theinhtut

Description

@theinhtut

I am unable to overwrite themeStorageKey value to my custom value my-key. Somehow, it is always theme by default 🐞

theme-key

However, I have noticed that there is a fix in PR #2. This should actually solve the issue. So I checked πŸ” under node_modules/gatsby-plugin-theme-switcher. Maybe I am wrong but seem like library files are generated before PR #2 merged.

Is there any workaround for this?

gatsby-config.js

module.exports = {
  plugins: [
   {
      resolve: 'gatsby-plugin-theme-switcher',
      options: {
        defaultDarkTheme: 'theme-hello',
        defaultLightTheme: 'theme-hello',
        themeStorageKey: 'my-key',
        minify: true,
      }
    },
    ...,
  ],
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions