yarn add vite vite-plugin-nextcloud -D
npm install vite vite-plugin-nextcloud --save-dev
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'
}
}
})