Eject

The eject package enables you to take control of Vike extensions.

🚧
The eject package is work-in-progress.

It moves the code of the extension from /node_modules/vike-some-extension/ to your Git repository at /ejected/vike-some-extension/. This means you can then fully modify the code of vike-some-extension.

The ejected code at /ejected/vike-some-extension is the built JavaScript, but there is work-in-progress for copying the original source code (e.g. TypeScript) from the extension's Git repository (instead of copying /node_modules/vike-some-extension/).

Eject also has limited support for other npm packages; Vike extensions are guaranteed to be fully supported.

When to eject?

In general, before considering ejection, we recommend reaching out to the maintainer of the Vike extension and to consider making a Pull Request.

Only eject as a last resort — when it's clear that it's the only option.

See also: Vike extension VS custom integration.