diff --git a/packages/nuqs/package.json b/packages/nuqs/package.json index 7998ca1c5..718de6a80 100644 --- a/packages/nuqs/package.json +++ b/packages/nuqs/package.json @@ -32,19 +32,16 @@ ], "type": "module", "sideEffects": true, - "main": "dist/index.cjs", "module": "dist/index.js", "types": "dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" + "import": "./dist/index.js" }, "./parsers": { "types": "./dist/parsers.d.ts", - "import": "./dist/parsers.js", - "require": "./dist/parsers.cjs" + "import": "./dist/parsers.js" } }, "scripts": { @@ -82,7 +79,7 @@ }, "size-limit": [ { - "name": "Client (ESM)", + "name": "Client", "path": "dist/index.js", "limit": "4 kB", "ignore": [ @@ -90,7 +87,7 @@ ] }, { - "name": "Parsers (ESM)", + "name": "Parsers", "path": "dist/parsers.js", "limit": "2 kB", "ignore": [ diff --git a/packages/nuqs/scripts/prepack.sh b/packages/nuqs/scripts/prepack.sh index f6d23cd45..08f84826d 100755 --- a/packages/nuqs/scripts/prepack.sh +++ b/packages/nuqs/scripts/prepack.sh @@ -13,8 +13,8 @@ VERSION=$(cat package.json | jq -r '.version') if [[ "$(uname)" == "Darwin" ]]; then # macOS requires an empty string as the backup extension - sed -i '' "s/0.0.0-inject-version-here/${VERSION}/g" dist/index.{js,cjs} + sed -i '' "s/0.0.0-inject-version-here/${VERSION}/g" dist/index.js else # Ubuntu (CI/CD) doesn't - sed -i "s/0.0.0-inject-version-here/${VERSION}/g" dist/index.{js,cjs} + sed -i "s/0.0.0-inject-version-here/${VERSION}/g" dist/index.js fi diff --git a/packages/nuqs/tsup.config.ts b/packages/nuqs/tsup.config.ts index e6a8e394c..c24ddedf9 100644 --- a/packages/nuqs/tsup.config.ts +++ b/packages/nuqs/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ index: 'src/index.ts', parsers: 'src/index.parsers.ts' }, - format: ['esm', 'cjs'], + format: ['esm'], dts: true, outDir: 'dist', splitting: true,