a comparison of tools within the JavaScript ecosystem

dev: fix a few build setups concerning exports

there were a few errors in the export configuration, which were:
- node-rollup-cjs-cjs
- node-tsc-js-esm
- node-tsc-ts-esm
- node-webpack-js-esm
- node-webpack-ts-esm

+26 -9
+5 -3
libs/node-rollup-js-cjs/package.json
··· 18 18 "exports": { 19 19 ".": { 20 20 "types": "./dist/index.d.ts", 21 - "import": "./dist/index.js" 21 + "require": "./dist/index.js" 22 22 } 23 23 }, 24 24 "scripts": { 25 - "build": "rollup --config rollup.config.js", 25 + "build": "pnpm run dts && rollup --config rollup.config.js", 26 26 "dev": "pnpm run build -- -w", 27 + "dts": "tsc", 27 28 "prepublint": "pnpm run build", 28 29 "publint": "publint ." 29 30 }, 30 31 "devDependencies": { 31 32 "@rollup/plugin-commonjs": "catalog:bundler", 32 33 "@rollup/plugin-node-resolve": "catalog:bundler", 33 - "rollup": "catalog:bundler" 34 + "rollup": "catalog:bundler", 35 + "rollup-plugin-dts": "catalog:bundler" 34 36 } 35 37 }
+12
libs/node-rollup-js-cjs/tsconfig.json
··· 1 + { 2 + "include": [ 3 + "src" 4 + ], 5 + "compilerOptions": { 6 + "allowJs": true, 7 + "declaration": true, 8 + "emitDeclarationOnly": true, 9 + "outDir": "dist", 10 + "declarationMap": true 11 + } 12 + }
+1 -1
libs/node-tsc-js-esm/package.json
··· 17 17 "exports": { 18 18 ".": { 19 19 "types": "./dist/index.d.ts", 20 - "require": "./dist/index.js" 20 + "import": "./dist/index.js" 21 21 } 22 22 }, 23 23 "scripts": {
+2 -2
libs/node-tsc-ts-esm/package.json
··· 13 13 "dist" 14 14 ], 15 15 "type": "module", 16 - "main": "dist/index.js", 16 + "module": "dist/index.js", 17 17 "types": "dist/index.d.ts", 18 18 "exports": { 19 19 ".": { 20 20 "types": "./dist/index.d.ts", 21 - "require": "./dist/index.js" 21 + "import": "./dist/index.js" 22 22 } 23 23 }, 24 24 "scripts": {
+1 -1
libs/node-tsup-ts-esm/package.json
··· 17 17 "exports": { 18 18 ".": { 19 19 "types": "./dist/index.d.ts", 20 - "require": "./dist/index.js" 20 + "import": "./dist/index.js" 21 21 } 22 22 }, 23 23 "scripts": {
+1 -1
libs/node-webpack-js-esm/package.json
··· 17 17 "exports": { 18 18 ".": { 19 19 "types": "./dist/index.d.ts", 20 - "require": "./dist/index.js" 20 + "import": "./dist/index.js" 21 21 } 22 22 }, 23 23 "scripts": {
+1 -1
libs/node-webpack-ts-esm/package.json
··· 17 17 "exports": { 18 18 ".": { 19 19 "types": "./dist/index.d.ts", 20 - "require": "./dist/index.js" 20 + "import": "./dist/index.js" 21 21 } 22 22 }, 23 23 "scripts": {
+3
pnpm-lock.yaml
··· 184 184 rollup: 185 185 specifier: catalog:bundler 186 186 version: 4.31.0 187 + rollup-plugin-dts: 188 + specifier: catalog:bundler 189 + version: 6.3.0(rollup@4.31.0)(typescript@5.9.3) 187 190 188 191 libs/node-rollup-js-esm: 189 192 devDependencies: