diff --git a/package.json b/package.json index 382d6ff4..e7980819 100644 --- a/package.json +++ b/package.json @@ -25,10 +25,7 @@ "email": "ashref@ashgw.me" }, "sideEffects": false, - "exports": { - "import": "./dist/index.mjs", - "require": "./dist/index.cjs" - }, + "types": "./dist/index.d.ts", "files": [ "dist/", "package.json", diff --git a/rollup.config.ts b/rollup.config.ts index 3bcf0443..1ea4238c 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -5,8 +5,6 @@ import rollupPluginAutoExternal from 'rollup-plugin-auto-external'; import rollupPluginDts from 'rollup-plugin-dts'; import path from 'path'; -import pkg from './package.json' assert { type: 'json' }; - const common: RollupOptions = { input: 'src/index.ts', external: [], @@ -22,12 +20,12 @@ const runtimes: RollupOptions = { ...common, output: [ { - file: pkg.exports.import, + file: './dist/index.mjs', format: 'esm', sourcemap: false, }, { - file: pkg.exports.require, + file: './dist/index.cjs', format: 'cjs', sourcemap: false, },