diff --git a/src/interface/components/ThemeSelector.tsx b/src/interface/components/ThemeSelector.tsx index 2c549874..0588c43d 100644 --- a/src/interface/components/ThemeSelector.tsx +++ b/src/interface/components/ThemeSelector.tsx @@ -69,7 +69,7 @@ const ThemeSelector: ForwardRefExoticComponent & useEffect(() => { let intervalId: any; if (isVisible) { - intervalId = setInterval(fetchThemes, 5000); + intervalId = setInterval(fetchThemes, 2000); } else { clearInterval(intervalId); } diff --git a/vite.config.ts b/vite.config.ts index 666ae65a..01bdcc3e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,35 +1,42 @@ -import { defineConfig } from 'vite' -import { crx } from '@crxjs/vite-plugin' -import million from "million/compiler" -import manifest from './manifest.json' -import react from '@vitejs/plugin-react-swc' -import { join } from 'path' +import MillionLint from '@million/lint'; +import { defineConfig } from 'vite'; +import { crx } from '@crxjs/vite-plugin'; +import million from "million/compiler"; +import manifest from './manifest.json'; +import react from '@vitejs/plugin-react-swc'; +import { join } from 'path'; + +const plugins = [ + react(), + million.vite({ + auto: { + threshold: 0.005, + // default: 0.1, + skip: [] // default [] + } + }), + crx({ + manifest + }) +]; +plugins.unshift(MillionLint.vite()) export default defineConfig({ - plugins: [ - react(), - million.vite({ - auto: { - threshold: 0.005, // default: 0.1, - skip: [], // default [] - } - }), - crx({ manifest }), - ], + plugins: plugins, server: { port: 5173, hmr: { host: "localhost", protocol: "ws", - port: 5173, - }, + port: 5173 + } }, build: { minify: false, rollupOptions: { input: { - settings: join(__dirname, 'src', 'interface', 'index.html'), + settings: join(__dirname, 'src', 'interface', 'index.html') } - }, - }, -}) + } + } +}); \ No newline at end of file