a comparison of tools within the JavaScript ecosystem

chore: fix a few build setups concerning exports #2

merged opened by samanthanguyen.me targeting main from 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
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:smd2mvg2dao4rqnnz6qexdov/sh.tangled.repo.pull/3mbwpnltl2u22
+24 -9
Diff #0
+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 }
+10
libs/node-rollup-js-cjs/tsconfig.json
··· 1 + { 2 + "include": ["src"], 3 + "compilerOptions": { 4 + "allowJs": true, 5 + "declaration": true, 6 + "emitDeclarationOnly": true, 7 + "outDir": "dist", 8 + "declarationMap": true 9 + } 10 + }
+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:

History

1 round 0 comments
sign up or login to add to the discussion
2 commits
expand
dev: fix a few build setups concerning exports
dev: apply formatting
8/8 success
expand
expand 0 comments
pull request successfully merged