From d9b3ffe51dc887f74c91b76564a45c42696d6460 Mon Sep 17 00:00:00 2001 From: Percs <83934299+Percslol@users.noreply.github.com> Date: Sun, 7 Jul 2024 17:41:07 -0500 Subject: [PATCH] update rollup config and package json --- package.json | 5 +++-- rollup.config.js | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 86b9cca..e8466ff 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,9 @@ ], "exports": { ".": { - "import": "./dist/client.js", - "types": "./dist/client.d.ts" + "import": "./dist/index.js", + "require": "./dist/bare.cjs", + "types": "./dist/index.d.ts" }, "./node": { "import": "./lib/index.cjs", diff --git a/rollup.config.js b/rollup.config.js index 1dfcffc..2f98fcd 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -30,13 +30,24 @@ const configs = [ { input: './src/index.ts', output: { - file: 'dist/client.js', + file: 'dist/index.js', format: 'esm', sourcemap: true, exports: 'named', }, plugins: commonPlugins() - } + }, + { + input: 'src/index.ts', + output: { + file: 'dist/bare.cjs', + format: 'umd', + name: 'BareMux', + sourcemap: true, + exports: 'auto', + }, + plugins: commonPlugins(), + }, ]; export default configs;