2022-05-12 07:00:07 +03:00
|
|
|
import { resolve } from 'path'
|
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import { createVuePlugin } from 'vite-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-06-01 13:04:01 +03:00
|
|
|
plugins: [createVuePlugin(), 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: {
|
|
|
|
globals: { vue: 'Vue' }
|
|
|
|
},
|
|
|
|
},
|
2022-05-17 10:11:55 +03:00
|
|
|
minify: false,
|
2022-05-12 07:00:07 +03:00
|
|
|
},
|
|
|
|
})
|