Skip to content

Commit

Permalink
Add ws polyfill to nodejs-client
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Martinez <[email protected]>
  • Loading branch information
sebastinez committed Oct 24, 2023
1 parent 84d7890 commit a60cb9b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-disable import/no-extraneous-dependencies */
import typescript from '@rollup/plugin-typescript';
import resolve from '@rollup/plugin-node-resolve';
import { wasm } from '@rollup/plugin-wasm';
import commonjs from '@rollup/plugin-commonjs';
import modify from 'rollup-plugin-modify';
import resolve from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import polyfill from 'rollup-plugin-polyfill';
import { wasm } from '@rollup/plugin-wasm';

export default {
input: 'src/worker.ts',
Expand All @@ -19,6 +20,7 @@ export default {
preferBuiltins: true,
extensions: ['.js', '.ts'],
}),
polyfill(['ws']),
commonjs(),
// TODO: `getObject(...).require` seems to generate a warning on Webpack but with Rollup we get a panic since it can't require.
// By hard coding the require here, we can workaround that.
Expand Down

0 comments on commit a60cb9b

Please sign in to comment.