Vite Plugin Graphweaver

raw JSON →
2.22.0 verified Mon Apr 27 auth: no javascript

A Vite plugin for integrating Graphweaver's admin UI into your project. Current stable version is 2.22.0, released monthly with patches. It is part of the Graphweaver ecosystem, a headless CMS built on GraphQL with support for PostgreSQL, MySQL, SQLite. Key differentiator: seamless integration with Graphweaver's admin panel via Vite. Requires Vite ^5.0.0 || ^6.0.0 || ^7.0.0 as a peer dependency.

error Error: Cannot find module 'vite-plugin-graphweaver'
cause Package not installed or Vite version mismatch.
fix
Install the package: npm install vite-plugin-graphweaver --save-dev
error TypeError: graphweaver is not a function
cause Incorrect import or usage in vite.config.js.
fix
Use import graphweaver from 'vite-plugin-graphweaver' and call it as graphweaver({}).
error ERR_REQUIRE_ESM: require() of ES Module not supported
cause Using CommonJS require() to import an ESM-only package.
fix
Switch to import syntax or use dynamic import().
breaking In v2.22.0, msal packages were moved from peer to direct dependencies. If you use pnpm, you may need overrides to avoid duplicate versions.
fix Add pnpm overrides in package.json for @azure/msal-browser and @azure/msal-react to pin versions.
gotcha Plugin requires Vite ^5.0.0 || ^6.0.0 || ^7.0.0. Using older Vite versions will cause import errors.
fix Update Vite to version 5, 6, or 7.
gotcha The plugin is ESM-only; CommonJS require() will fail with 'ERR_REQUIRE_ESM'.
fix Use import syntax and ensure your project is configured for ESM.
npm install vite-plugin-graphweaver
yarn add vite-plugin-graphweaver
pnpm add vite-plugin-graphweaver

Demonstrates adding the Graphweaver Vite plugin to a vite.config.ts file.

// vite.config.ts
import { defineConfig } from 'vite';
import graphweaver from 'vite-plugin-graphweaver';

export default defineConfig({
  plugins: [
    graphweaver({
      // Optional configuration
      // adminUi: { enabled: true },
    }),
  ],
});