UNPKG

@salaros/is-biz-mail

Version:

isBizMail tells you whether a given email address is free (gmail.com, yahoo.es, yandex.ru etc) or not

33 lines (31 loc) 1 kB
import { dirname, resolve } from 'node:path' import { fileURLToPath } from 'node:url' import { defineConfig } from 'vite' import pkg from './package.json' with { type: 'json' } const __dirname = dirname(fileURLToPath(import.meta.url)) export default defineConfig({ build: { minify: true, sourcemap: true, lib: { entry: resolve(__dirname, 'lib/index.ts'), name: 'isBizMail', // the proper extensions will be added fileName: 'isBizMail', formats: ['es', 'cjs', 'iife'], }, rollupOptions: { // make sure to externalize deps that shouldn't be bundled // into your library external: [ ...Object.keys(pkg.dependencies), // don't bundle dependencies /^node:.*/, // don't bundle built-in Node.js modules (use protocol imports!) ], output: { // Provide global variables to use in the UMD build // for externalized deps globals: {}, }, }, }, })