Skip to content

Commit

Permalink
Merge pull request #1716 from ably/node-ws-external
Browse files Browse the repository at this point in the history
build(node): mark ws as external module
  • Loading branch information
VeskeR authored Apr 8, 2024
2 parents 9b43b8b + 791929b commit f042f86
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions grunt/esbuild/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ const nodeConfig = {
platform: 'node',
entryPoints: ['src/platform/nodejs/index.ts'],
outfile: 'build/ably-node.js',
/**
* externals are not bundled into the esbuild output, instead they are left
* as commonjs imports. This means that the version installed via package.json
* dependencies is used rather than being pinned to whatever version we built
* the package release with. This is especially important in the case of 'ws'
* where the bun runtime has its own 'ws' module, and the npm 'ws' module
* doesn't work at all.
*/
external: ['ws', 'got'],
};

module.exports = {
Expand Down

0 comments on commit f042f86

Please sign in to comment.