From 7964ae57bbe231cfb9c12d0a1631dba91f57d716 Mon Sep 17 00:00:00 2001 From: Ariful Alam Date: Thu, 24 Mar 2022 23:32:27 +0600 Subject: [PATCH] Create package.config.js --- package.config.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 package.config.js diff --git a/package.config.js b/package.config.js new file mode 100644 index 0000000..e0354e4 --- /dev/null +++ b/package.config.js @@ -0,0 +1,27 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import postcss from './postcss.config.js'; +import path from 'path'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [react()], + css: { + postcss, + }, + build: { + lib: { + entry: path.resolve(__dirname, 'src/components/GitProfile.jsx'), + name: 'GitProfile', + fileName: (format) => `gitprofile.${format}.js`, + }, + rollupOptions: { + external: ['react', 'react-dom'], + output: { + globals: { + react: 'React', + }, + }, + }, + }, +});