47 lines
879 B
JavaScript
47 lines
879 B
JavaScript
import { resolve } from 'path'
|
|
import { defineConfig } from 'vite'
|
|
import svgLoader from 'vite-svg-loader'
|
|
import eslintPlugin from 'vite-plugin-eslint'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
lib: {
|
|
entry: resolve(__dirname, 'lib/index.js'),
|
|
name: 'Omorphia',
|
|
fileName: 'omorphia',
|
|
},
|
|
rollupOptions: {
|
|
external: ['vue'],
|
|
output: {
|
|
globals: {
|
|
vue: 'Vue',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
plugins: [
|
|
vue(),
|
|
svgLoader({
|
|
svgoConfig: {
|
|
plugins: [
|
|
{
|
|
name: 'preset-default',
|
|
params: {
|
|
overrides: {
|
|
removeViewBox: false,
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
eslintPlugin(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': resolve(__dirname, './lib'),
|
|
},
|
|
},
|
|
})
|