npm.io
1.0.0 • Published 6 months ago

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

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0

Vite Plugin OX Bundle

A vite plugin to create a custom bundle file to reduce js requests for App Suite UI

Install

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

How to use

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

return {
  plugins: [vitePluginOxBundle()]
}

You need to manual define a bundle file:

// bundles.json
[
  {
    name: 'mybundle.js',
    files: [
      ....
    ]
  }
]

Options

You can provide the following options to the plugin:

  • src <string> Path to predefined bundles file. Default: ./bundles.json
  • htmlFiles <string[]> HTML files to be added to manifest. Default: []
  • ignore <string[]> Paths to be ignored. Default: []