CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

vite-plugin-cds

A CAP plugin that serves a Vite app from the app folder through cds watch, makes .cds files importable into the frontend build, and can polyfill enough of Node to run @sap/cds in the browser.

Installed as a dev dependency of a CAP project, it puts a Vite frontend under the same command as the service: a vite.config.js beside an index.html in app/ and cds watch serves that page through Vite. Its cds() plugin makes a .cds model file importable from frontend code, so a model reaches the browser as a module rather than through a build step written by hand. node() and cap() go further and polyfill enough of Node for @sap/cds to run in the page itself: the README compiles a CSN model in the browser, deploys it to @cap-js/sqlite over SQLite built to WebAssembly, and serves OData from an Express app the page calls directly. The README names the limitation of that browser runtime, that cds.context is not unique per request or transaction, and points at its own note on asynchronous context tracking.

Facts

Latestv0.3.6ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
Local developmentCAPLocal developmentcapabilityRunning the whole stack on a laptop against real bindings — the service, the UI and the routing in front of it — without deploying to see a change.
Flavors
Node.jsfrom its runtime
Requires
@sap/cds≥ 9@sap/cdsartifactthe CAP runtime it plugs into, named by the README as its peer dependencyViteViteoutside the atlasthe build tool and development server it is a plugin for, installed beside it
Optional
@cap-js/sqlite@cap-js/sqliteartifactthe database the cds runtime deploys to when the model is compiled and served in the browserSQLiteSQLiteoutside the atlasthe SQLite build that browser runtime sits on, which the README's dependency list names as @sqlite.org/sqlite-wasm

Who is behind it

Johannes VogtJohannes VogtPersonMaintains this
In the atlas: maintains 1, contributes to 28, wrote 10
@Akatuoro
maintainerChristian GeorgiPersonContributes to this
In the atlas: maintains 1, contributes to 53
@chgeo
1 contributor

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →

What it declares

Every artifact

Type
CDS plugin
Origin
Independently maintained
Runtime
Node.js

As a CDS plugin

Declared for
>=9
Distributed through
npm

Connections5

vite-plugin-cds connectionsvite-plugin-cdsPROVIDES→ provides1provides stated Brings a Vite frontend under cds watch, so the service and the app in front of it come up on one command and the page is served by Vite rather than by a second process started beside it. vite-plugin-cds — README, Vite apps with cds watch: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.md vite-plugin-cds — README, Vite apps with cds watch: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.mdLocal developmentNEEDS→ needs2needs stated the CAP runtime it plugs into, named by the README as its peer dependency vite-plugin-cds — README, prerequisite: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.md@sap/cdsneeds stated the build tool and development server it is a plugin for, installed beside it vite-plugin-cds — README, installation: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.mdVite→ optionally needs2optionally needs stated If: the cds runtime is run in the browser through the node() and cap() plugins the database the cds runtime deploys to when the model is compiled and served in the browser vite-plugin-cds — README, cds in the browser: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.md@cap-js/sqliteifoptionally needs stated If: the cds runtime is run in the browser through the node() and cap() plugins the SQLite build that browser runtime sits on, which the README's dependency list names as @sqlite.org/sqlite-wasm vite-plugin-cds — README, cds in the browser: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.md vite-plugin-cds — README, cds in the browser: https://raw.githubusercontent.com/Akatuoro/vite-plugin-cds/main/README.mdSQLiteif

Install

npm add vite-plugin-cds

Derived from the package name. No recipe recorded; the README has the configuration.

Where it sits in your app

Download
Your CAP applicationdocumentedrequiresdocumentedmay needif the cds runtime is run inthe browser through the node()and cap() pluginsdocumentedmay needif the cds runtime is run inthe browser through the node()and cap() pluginsVite, systemVitesystemSQLite, systemSQLitesystemvite-plugin-cds, modulevite-plugin-cds@cap-js/sqlite, module@cap-js/sqlite
SAPnot SAP's, or the project's owndocumented onlyunder a condition

README

quoted from Akatuoro/vite-plugin-cds under MIT, read
Akatuoro/vite-plugin-cds/README.mdOn GitHub

vite-plugin-cds

A vite plugin for @sap/cds.

On the left: Page with title 'CDS Plugin Test', a compile result, an OData response and a compile result from a worker. On the right: DevTools Console calling cds.compile, await INSERT.into and await cds.ql

Usage

Prerequisite:

  • This library has a peer dependency to @sap/cds.
Vite apps with cds watch

Install vite and this plugin as development dependencies in your CAP project.

npm install --save-dev vite vite-plugin-cds

Add a vite.config.js to any frontend application in the app/ folder of your CAP project.

app/
  my-vite-app/
    index.html
    vite-config.js

The index.html is now served automatically via vite when you run:

cds watch

Example App

Import cds model files in your vite app

Add the cds plugin to your vite config.

// vite.config.js
import { defineConfig } from 'vite'
import { cds } from 'vite-plugin-cds'

export default defineConfig({
  plugins: [ cds() ],
  root: './',
})

In your vite app, you can now import cds model files.

import cdsModel from './index.cds';

Example App

cds in the browser

You need the following dependencies for a functional runtime:

npm install --save-dev vite vite-plugin-cds @sap/cds @cap-js/sqlite @sqlite.org/sqlite-wasm express

Configure the plugins in your vite config:

// vite.config.js
import { defineConfig } from 'vite'
import { node, cap } from 'vite-plugin-cds'

export default defineConfig({
  plugins: [ node(), cap() ],
  root: './',
})

In your frontend vite app, you can now compile a model and start the cds runtime:

import cds from '@sap/cds'
import sqlite from 'better-sqlite3'
import express from 'express';

//======= compile a csn model =======
const csn = cds.compile(`
entity my.Books {
  key ID: Integer;
  title: String
}
service CatalogService {
  entity Books as projection on my.Books;
}`);
console.log(csn.definitions)

//======= start a cds server =======
await sqlite.initialized // wait for sqlite3-wasm to be ready (part of polyfill)

cds.model = cds.compile.for.nodejs (csn);
cds.db = await cds.connect.to('db');
await cds.deploy(csn).to(cds.db);

const app = express();
await cds.serve('all').from(csn).in(app);

const response = await app.handle({url: '/odata/v4/catalog/Books'}) // part of polyfill
console.log('response', response);

Example App

Known limitations:

MIT, read

History

Latest

v0.3.6

Notes

Now also fully functional in workers

  1. v0.3.4

  2. v0.3.3

    Notes

    improved support for ssr scenarios

  3. v0.3.2

    Notes

    fixed warnings, improved rolldown compatibility

  4. v0.3.1

    Notes

    support vite5, used by vitepress1

  5. v0.3.0

    Notes

    vite8 support

  6. v0.2.0

    Notes

    Support for cds 9.8

  7. v0.1.10

    Notes

    removed minify: false, added manual chunks

  8. v0.1.9

  9. v0.1.8

    Notes

    handle custom db functions and approximate asynchronous context tracking

  10. v0.1.6

    Notes

    add csv loading

  11. v0.1.5

  12. v0.1.4

    Notes

    Use minify with esbuild

  13. v0.1.3

    Notes

    vite build for @sap/cds in the browser

  14. v0.1.2

    Notes

    cds.serve in the browser

  15. v0.1.0

25downloads per week, npm
Weekly downloads for vite-plugin-cds26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 25.20 Apr – 26 Apr: 23327 Apr – 3 May: 2924 May – 10 May: 45411 May – 17 May: 13718 May – 24 May: 9025 May – 31 May: 1201 Jun – 7 Jun: 748 Jun – 14 Jun: 5615 Jun – 21 Jun: 11622 Jun – 28 Jun: 35129 Jun – 5 Jul: 1126 Jul – 12 Jul: 9313 Jul – 19 Jul: 7220 Jul – 26 Jul: 25627 Jul – 2 Aug: 1043 Aug – 9 Aug: 5810 Aug – 16 Aug: 9617 Aug – 23 Aug: 22924 Aug – 30 Aug: 10131 Aug – 6 Sept: 427 Sept – 13 Sept: 8314 Sept – 20 Sept: 8321 Sept – 27 Sept: 8428 Sept – 4 Oct: 575 Oct – 11 Oct: 4812 Oct – 18 Oct: 25
Local development
  1. com.sap.cds:cds-feature-dev-dashboardBrowser dashboard for a running CAP Java service during development
  2. com.sap.cds:cds-maven-pluginMaven plugin running CDS build steps in a CAP Java project
  3. @cap-js-community/commonSix CAP features in one package, from replication cache to rate limits
  4. @neoimpulse/cap-js-bootstrapCLI starting several CAP services and an AppRouter locally together
  5. @sang2x/captoolsCLI of CAP development tools for Cloud Foundry workflows
  6. @sap/ams-devCompiler from AMS DCL policies to DCN for local runs and tests
  7. @sap/cds-dkCommand line client and development toolkit for CAP
  8. @sap/cdsCAP Node.js runtime
  9. dev-approuterDev-time wrapper for the SAP Application Router

Details

Sources5
npm registrydiscovered here, npm:cds-pluginchecked
npm registrydiscovered here, npm:cds-checked
npm registry, vite-plugin-cdsversion, releases, installschecked
github.com/git+https://github.com/Akatuoro/vite-plugin-cds.gittree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for>=9
latestv0.3.6
first release
releases and cadence19, ~15d median
discovered vianpm registry · npm:cds-plugin, npm registry · npm:cds-
first seen in the atlas
ecosystem and domaincap, developer-experience
Contributors1

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:akatuoro-vite-plugin-cds
JSON
/artifacts/akatuoro-vite-plugin-cds.json
MCP
Connecting an agent