diff --git a/package.json b/package.json index 71d50c7..68897a5 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "6.2.0", "description": "React component to draw confetti for your party.", "main": "dist/index.js", + "type": "commonjs", "repository": { "type": "git", "url": "https://github.com/alampros/react-confetti.git" @@ -81,4 +82,4 @@ "engines": { "node": ">=16" } -} +} \ No newline at end of file diff --git a/rollup.config.ts b/rollup.config.ts index 4e35fd5..7f8eadd 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -7,8 +7,9 @@ const config: RollupOptions = { input: 'src/index.ts', output: { dir: 'dist', - format: 'es', + format: 'module', sourcemap: true, + exports: 'default', }, external: ['react', 'react-dom', 'tween-functions'], plugins: [