2022-05-12 07:00:07 +03:00
|
|
|
import { resolve } from 'path'
|
|
|
|
import { defineConfig } from 'vite'
|
2022-07-22 16:53:52 +03:00
|
|
|
import vue from '@vitejs/plugin-vue2'
|
2022-06-01 13:04:01 +03:00
|
|
|
import commonjs from 'vite-plugin-commonjs'
|
2022-05-12 07:00:07 +03:00
|
|
|
import { dependencies } from './package.json'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2022-07-22 16:53:52 +03:00
|
|
|
plugins: [vue(), commonjs],
|
2022-05-12 07:00:07 +03:00
|
|
|
build: {
|
|
|
|
lib: {
|
|
|
|
entry: resolve(__dirname, 'src/package.js'),
|
|
|
|
name: '@nextcloud/text',
|
2022-05-12 14:56:09 +03:00
|
|
|
fileName: (_format) => 'index.js',
|
2022-05-12 07:00:07 +03:00
|
|
|
formats: ['es'],
|
|
|
|
},
|
|
|
|
rollupOptions: {
|
|
|
|
external: Object.keys(dependencies),
|
|
|
|
output: {
|
2022-07-22 16:53:52 +03:00
|
|
|
globals: { vue: 'Vue' },
|
2022-05-12 07:00:07 +03:00
|
|
|
},
|
|
|
|
},
|
2022-05-17 10:11:55 +03:00
|
|
|
minify: false,
|
2022-05-12 07:00:07 +03:00
|
|
|
},
|
|
|
|
})
|