]> git.codecow.com Git - nano25519.git/commitdiff
Revert type emission and copy with esbuild. Fix exports to make types available for...
authorChris Duncan <chris@zoso.dev>
Fri, 19 Jun 2026 06:34:31 +0000 (23:34 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 19 Jun 2026 06:34:31 +0000 (23:34 -0700)
esbuild/config.mjs
package.json
tsconfig.json

index e712a47b688e3decca06f23c7afdac153450d6a9..958781cd45c96980bc0314f1c4a98947dbc5ecfc 100644 (file)
@@ -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'],
index b1a63724bba6768319091d577fcc56c3a11b21bb..704fcb3c4f477f739e4db199e843b64c783b5f67 100644 (file)
                },
                "./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": {
index 0ad3321c933667381fb40bb612b1136d29ba2d2a..96d42b2b7b49656246cb8add33a23d66d1af75aa 100644 (file)
@@ -11,7 +11,7 @@
                "declaration": true,
                "emitDeclarationOnly": true,
                "rootDir": ".",
-               "outDir": "dist",
+               "outDir": "types",
                "declarationMap": true,
                "lib": [
                        "DOM",