diff --git a/package.json b/package.json index ecf25d4..d0b8a6c 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,17 @@ "name": "react-thumbnail-generator", "version": "3.1.1", "description": "react-thumbnail-generator", - "main": "dist/cjs/index.js", - "module": "dist/esm/index.js", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "require": "./dist/index.js", + "import": "./dist/index.mjs" + }, + "./package.json": "./package.json" + }, + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "files": [ "dist" ], diff --git a/rollup.config.mjs b/rollup.config.mjs index cdc4bb4..14b2656 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -18,12 +18,12 @@ export default { output: [ { file: pkg.main, - sourcemap: false, + sourcemap: true, format: 'cjs', }, { file: pkg.module, - sourcemap: false, + sourcemap: true, format: 'esm', }, ],