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', + }, + }, + }, + }, +});