{"id":22724,"library":"vite-plugin-logseq","title":"vite-plugin-logseq","description":"A Vite plugin for Logseq plugin development that fixes HMR issues by providing a valid index.html and reloading plugins when updates fall outside the UI framework's HMR boundary. Current stable version is 1.1.2, last updated in April 2022. It is a niche tool specifically for Logseq plugin developers using Vite. Differentiators: it handles the unique development workflow for Logseq plugins, solving HMR mismatches that standard Vite setups cannot.","status":"maintenance","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/pengx17/vite-plugin-logseq","tags":["javascript","typescript"],"install":[{"cmd":"npm install vite-plugin-logseq","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-logseq","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-logseq","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; named import will fail.","wrong":"import { logseqPlugin } from \"vite-plugin-logseq\"","symbol":"logseqPlugin","correct":"import logseqPlugin from \"vite-plugin-logseq\""},{"note":"CJS require gets the default export as the entire module.","wrong":"const { logseqPlugin } = require(\"vite-plugin-logseq\")","symbol":"logseqPlugin","correct":"const logseqPlugin = require(\"vite-plugin-logseq\")"},{"note":"TypeScript type export; must use 'import type' for proper TypeScript usage.","wrong":"import { LogseqPluginOptions } from \"vite-plugin-logseq\"","symbol":"LogseqPluginOptions","correct":"import type { LogseqPluginOptions } from \"vite-plugin-logseq\""}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite'\nimport logseqPlugin from 'vite-plugin-logseq'\n\nexport default defineConfig({\n  plugins: [\n    logseqPlugin()\n  ]\n})","lang":"typescript","description":"Shows how to add the logseqPlugin to a Vite config to enable HMR for Logseq plugin development."},"warnings":[{"fix":"Ensure logseqPlugin() is the last plugin in the plugins array.","message":"Plugin must be placed after other plugins that handle HMR to avoid interference.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need automatic open, configure via plugin options or use Vite's open option.","message":"Default open behavior disabled in v1.1.1; browser no longer opens automatically.","severity":"breaking","affected_versions":">=1.1.1"},{"fix":"Consider alternative if issues arise; not actively maintained.","message":"Package is in maintenance mode with no updates since April 2022.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure your Vite root is set to the Logseq plugin directory containing an index.html.","cause":"Missing or misconfigured root directory for Logseq plugin.","error":"Error: [vite-plugin-logseq] Unable to find index.html in root directory"},{"fix":"Use default import: import logseqPlugin from 'vite-plugin-logseq'","cause":"Named import used instead of default import.","error":"TypeError: logseqPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}