]> git.codecow.com Git - nano25519.git/commitdiff
Simplify esbuild entry points for node build. Include source maps for typings.
authorChris Duncan <chris@zoso.dev>
Mon, 23 Mar 2026 05:46:51 +0000 (22:46 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 23 Mar 2026 05:46:51 +0000 (22:46 -0700)
esbuild/config.mjs

index 9dc12656189f8d1320e1d5201873aea67affe2e3..b9b8abb084675607a2e463eb1b8dd53825d19261 100644 (file)
@@ -8,7 +8,8 @@ const commonOptions = {
        bundle: true,
        loader: {
                '.wasm': 'binary',
-               '.d.ts': 'copy'
+               '.d.ts': 'copy',
+               '.d.ts.map': 'copy'
        },
        format: 'esm',
        legalComments: 'inline',
@@ -36,13 +37,10 @@ export const nodeOptions = {
        platform: 'node',
        target: 'node22',
        entryPoints: [
-               { in: './src/*.ts', out: '' },
-               // { in: './src/async.ts', out: 'async' },
-               // { in: './src/sync.ts', out: 'sync' },
-               { in: './types/index.d.ts', out: 'index.d' },
-               { in: './types/async.d.ts', out: 'async.d' },
-               { in: './types/sync.d.ts', out: 'sync.d' }
+               'src/*',
+               'types/*'
        ],
+       entryNames: '[name]',
        packages: 'external',
        dropLabels: ['BROWSER']
 }