diff --git a/package.json b/package.json index f239e48f..562e6f6d 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,14 @@ "version": "3.0.55", "description": "Reuseable React Components to build mapping apps for real life communities and networks", "repository": "https://github.com/utopia-os/utopia-ui", - "homepage:": "https://utopia-os.org/", - "module": "dist/index.js", + "homepage": "https://utopia-os.org/", + "module": "dist/index.esm.js", + "main": "dist/index.cjs", "types": "dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", + "import": "./dist/index.esm.js", + "require": "./dist/index.cjs", "types": "./dist/index.d.ts" } }, diff --git a/rollup.config.js b/rollup.config.js index 68125626..ccceab93 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,9 +7,13 @@ export default [ input: 'src/index.tsx', output: [ { - file: 'dist/index.js', + file: 'dist/index.esm.js', format: 'esm', }, + { + file: 'dist/index.cjs', + format: 'cjs', + }, ], plugins: [ postcss({