@open-xchange/vite-plugin-ox-externals
TypeScript icon, indicating that this package has built-in type declarations

0.8.0 • Public • Published

Vite Plugin OX Externals

A vite plugin that will mark prefixed modules as external and will transform the path in production into a path relative to the root.

Install

pnpm i "@open-xchange/vite-plugin-ox-externals"

How to use

// in the vite.config.js
import vitePluginOxExternals from '@open-xchange/vite-plugin-ox-externals'

return {
  plugins: [vitePluginOxExternals()]
}

Options

You can provide the following options to the plugin:

Name Type Default Description
prefix string '$' The prefix to use for external modules. Will always be followed by a / if you specify the path.

Example

// import the core settings module
import { Settings } from '$/io.ox/core/settings'

How to test

pnpm test

Readme

Keywords

none

Package Sidebar

Install

npm i @open-xchange/vite-plugin-ox-externals

Weekly Downloads

1,490

Version

0.8.0

License

MIT

Unpacked Size

8.11 kB

Total Files

5

Last publish

Collaborators

  • tran-dong.tran
  • bjoern.koester
  • hydrair
  • moritz.bach
  • andree
  • anne.matthes
  • johnyb
  • davidbauer
  • solygen
  • daniel.rentz
  • alexquast
  • d.haus
  • maik.schaefer
  • jjacobsohn