mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
web: add default export to CJS bundle
(cherry picked from commit 081c90b769)
This commit is contained in:
parent
79b60a271c
commit
3b85287d6d
|
|
@ -44,6 +44,9 @@ async function build() {
|
|||
keepNames: true,
|
||||
external: ['fs/*', 'fs/promises'],
|
||||
resolveExtensions: ['.ts', '.js', format === 'esm' ? '.mjs' : '.cjs'],
|
||||
...(format === 'cjs' ? {
|
||||
footer: { js: 'module.exports.default = module.exports;' },
|
||||
} : {}),
|
||||
});
|
||||
|
||||
// Copy the Wasm files to the appropriate spot, as esbuild doesn't "bundle" Wasm files
|
||||
|
|
|
|||
Loading…
Reference in a new issue