From: Chris Duncan Date: Fri, 19 Jun 2026 06:34:31 +0000 (-0700) Subject: Revert type emission and copy with esbuild. Fix exports to make types available for... X-Git-Tag: v1.0.4~2 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=a952ed7d86f7d03c5489715ccc3a30c008ed715a;p=nano25519.git Revert type emission and copy with esbuild. Fix exports to make types available for test module. --- diff --git a/esbuild/config.mjs b/esbuild/config.mjs index e712a47..958781c 100644 --- a/esbuild/config.mjs +++ b/esbuild/config.mjs @@ -7,7 +7,9 @@ const commonOptions = { bundle: true, loader: { - '.wasm': 'binary' + '.wasm': 'binary', + '.d.ts': 'copy', + '.d.ts.map': 'copy', }, format: 'esm', legalComments: 'inline', @@ -37,6 +39,7 @@ export const nodeOptions = { target: 'node22', entryPoints: [ 'src/*', + 'types/src/*', ], entryNames: '[name]', dropLabels: ['BROWSER'], diff --git a/package.json b/package.json index b1a6372..704fcb3 100644 --- a/package.json +++ b/package.json @@ -54,11 +54,13 @@ }, "./sync": { "types": "./dist/sync.d.ts", - "node": "./dist/sync.js" + "node": "./dist/sync.js", + "import": "./dist/sync.js" }, "./async": { "types": "./dist/async.d.ts", - "node": "./dist/async.js" + "node": "./dist/async.js", + "import": "./dist/async.js" } }, "browser": { diff --git a/tsconfig.json b/tsconfig.json index 0ad3321..96d42b2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "declaration": true, "emitDeclarationOnly": true, "rootDir": ".", - "outDir": "dist", + "outDir": "types", "declarationMap": true, "lib": [ "DOM",