UNPKG

@customizer/modal-x

Version:

Modal-X = **This Vue Plugin provides a simple and flexible way to create modals for your web applications using a file-based approach. Easily define modal content in separate files, allowing for better organization and maintainability with minimal effort.

40 lines (39 loc) 1.05 kB
import { fileURLToPath, URL } from 'node:url' import { resolve } from 'path' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' // https://vitejs.dev/config/ export default defineConfig({ plugins: [ vue(), vueJsx(), ], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), '@modals': fileURLToPath(new URL('./src/modals', import.meta.url)) } }, build: { lib: { // Could also be a dictionary or array of multiple entry points entry: resolve(__dirname, './src/modals/main.js'), name: '@customizer/modal-x', // the proper extensions will be added fileName: 'modal', }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: ['vue'], output: { // Provide global variables to use in the UMD build // for externalized deps globals: { vue: 'Vue', }, }, }, }, })