diff --git a/vite.config.js b/vite.config.js index 4d05008..bf1f109 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,16 +6,16 @@ export default defineConfig({ plugins: [react()], build: { lib: { - // Point this to the file where your BaseButton component lives entry: resolve(__dirname, 'src/App.jsx'), name: 'OslogReactBaseComponent', fileName: 'index', - formats: ['es'] // Outputs an ES Module (index.js) + formats: ['es'] }, rollupOptions: { - // Don't bundle react or react-dom into your library external: ['react', 'react-dom'], output: { + // Force explicit named exports matching your source code + exports: 'named', globals: { react: 'React', 'react-dom': 'ReactDOM'