npm.io
1.0.1 • Published 4 months ago

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

Licence
MIT
Version
1.0.1
Deps
2
Size
24 kB
Vulns
0
Weekly
0

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
The prefix to use for external modules. Will always be followed by a __INLINE_CODE_3__ if you specify the path.

Example

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

How to test

pnpm test