@harnessa-fe/unplugin
v3.0.0
Published
Unified build plugin for Harnessa-FE. Supports Vite, Rspack, esbuild, and Rollup via unplugin. Webpack users should use @harnessa-fe/webpack (native plugin) instead.
Readme
@harnessa-fe/unplugin
Unified build plugin core for Harnessa-FE. Powers the Vite, Rspack, esbuild, and Rollup adapters.
You normally do not install this directly — install the bundler-specific package instead:
@harnessa-fe/vite@harnessa-fe/webpack— native webpack plugin (not a unplugin adapter). Required for thread-loader compatibility.
Install (advanced)
pnpm add -D @harnessa-fe/unpluginUsage
import { harnessaFE } from '@harnessa-fe/unplugin/vite';
// or '/rspack' '/esbuild' '/rollup'Webpack users: install @harnessa-fe/webpack instead. The ./webpack subpath export has been removed because unplugin's webpack adapter serializes the plugin instance into loader options, which breaks thread-loader (the plugin holds a compiler reference and JSON.stringify trips on Compiler.root). See the changeset for details.
For custom integrations, import the raw factory:
import { unplugin, unpluginFactory } from '@harnessa-fe/unplugin';Public API
unplugin— pre-built unplugin instance (call.vite()/.rspack()/ etc.)unpluginFactory— raw factory for fully custom adapterstransformJsx— JSX/TSX source transform with location attribute injectiontransformVueSFC/transformVueTemplate— Vue SFC + template transformscreateMcpClient,installNodeLogCapture,createBuildIdentity,appendTokenQuery— internal building blocks used by@harnessa-fe/webpackto assemble a native plugin without going through unplugin's webpack adapter
Docs
License
MIT
