Registry / web-framework / vite-plugin-logseq

vite-plugin-logseq

JSON →
library1.1.2jsnpmunverified

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.

npm install vite-plugin-logseq
INSTALL
IMPORT
SIG · VITE-PLUGIN-LOGSEQ
V
vite-plugin-logseq
web-frameworkjavascriptv1.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

logseqPlugin
import logseqPlugin from "vite-plugin-logseq"
import { logseqPlugin } from "vite-plugin-logseq"
Default export only; named import will fail.
logseqPlugin
const logseqPlugin = require("vite-plugin-logseq")
const { logseqPlugin } = require("vite-plugin-logseq")
CJS require gets the default export as the entire module.
LogseqPluginOptions
import type { LogseqPluginOptions } from "vite-plugin-logseq"
import { LogseqPluginOptions } from "vite-plugin-logseq"
TypeScript type export; must use 'import type' for proper TypeScript usage.

Shows how to add the logseqPlugin to a Vite config to enable HMR for Logseq plugin development.

// vite.config.ts import { defineConfig } from 'vite' import logseqPlugin from 'vite-plugin-logseq' export default defineConfig({ plugins: [ logseqPlugin() ] })
Debug
Known issues
gotchaPlugin must be placed after other plugins that handle HMR to avoid interference.
fix
Ensure logseqPlugin() is the last plugin in the plugins array.
affects: >=1.0.0
breakingDefault open behavior disabled in v1.1.1; browser no longer opens automatically.
fix
If you need automatic open, configure via plugin options or use Vite's open option.
affects: >=1.1.1
deprecatedPackage is in maintenance mode with no updates since April 2022.
fix
Consider alternative if issues arise; not actively maintained.
affects: >=1.0.0
Errors
Common errors & fixes
Error: [vite-plugin-logseq] Unable to find index.html in root directory
Missing or misconfigured root directory for Logseq plugin.
fix
Ensure your Vite root is set to the Logseq plugin directory containing an index.html.
TypeError: logseqPlugin is not a function
Named import used instead of default import.
fix
Use default import: import logseqPlugin from 'vite-plugin-logseq'
Upgrade
Version history
1.1.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
vite-plugin-logseq — npm install vite-plugin-logseq · libregistry