vite-plugin-theme-preprocessor icon indicating copy to clipboard operation
vite-plugin-theme-preprocessor copied to clipboard

toggleTheme for typescript

Open hmz22 opened this issue 2 years ago • 3 comments

toggleTheme don't work in ts. I add this:

declare module "@zougt/vite-plugin-theme-preprocessor/dist/browser-utils" {
  export function toggleTheme(options: {
    scopeName?: string;
    customLinkHref?: (href: string) => string;
  });

  export function addClassNameToHtmlTag(options: {
    scopeName?: string;
    multipleScopeVars: { scopeName: string; path?: string }[];
  });
}

but not work and when use toggle show me error in console: Screenshot 2022-07-04 171805

please help for fix it

hmz22 avatar Jul 04 '22 12:07 hmz22

when build project worked prefect but in development with typescript mode show this error multipleScopeVars is null or undefined. please add support typescript

hmz22 avatar Jul 04 '22 14:07 hmz22

How did you fix the bug @hmz22 image I have this errors yet

Chasen-Zhang avatar Aug 29 '22 08:08 Chasen-Zhang

@

How did you fix the bug @hmz22 image I have this errors yet add themePreprocessorPlugin, themePreprocessorHmrPlugin to vite plugins

asnipera avatar Aug 30 '22 04:08 asnipera