diff --git a/webui/src/jslib.ts b/webui/src/jslib.ts new file mode 100644 index 0000000..2e15e9b --- /dev/null +++ b/webui/src/jslib.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2019-present, Frederick Emmott. + * All rights reserved. + * + * This source code is licensed under the MIT license found in the LICENSE file + * in the root directory of this source tree. + */ + +import RPCClient from './RPCClient'; +import handshake from './handshake'; + +window['StreamingRemote'] = { + RPCClient, + handshake, +}; + diff --git a/webui/webpack.config.js b/webui/webpack.config.js index 468450e..8c38fb5 100644 --- a/webui/webpack.config.js +++ b/webui/webpack.config.js @@ -9,10 +9,13 @@ const path = require('path'); module.exports = { - entry: './src/index.ts', + entry: { + bundle: './src/index.ts', + jslib: './src/jslib.ts', + }, output: { path: path.resolve(__dirname, 'dist'), - filename: 'bundle.js' + filename: '[name].js' }, resolve: { extensions: [".ts", ".tsx", ".js"],