/vite-plugin-nextcloud

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

vite-plugin-nextcloud

Install

yarn add vite vite-plugin-nextcloud -D
npm install vite vite-plugin-nextcloud --save-dev

Usage

vite.config.ts

import { defineConfig, splitVendorChunkPlugin } from 'vite'
import { nextcloud } from 'vite-plugin-nextcloud'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    splitVendorChunkPlugin(),
    nextcloud({
      namespace: 'OCA\\MyApp'
    })
  ],
  base: './',
  build: {
    outDir: './js',
    minify: true,
    rollupOptions: {
      input: './src/main.ts'
    }
  }
})