diff --git a/client-ts/rollup-base.js b/client-ts/rollup-base.js index cdb1cb6c09..b3f362c439 100644 --- a/client-ts/rollup-base.js +++ b/client-ts/rollup-base.js @@ -22,31 +22,13 @@ export default function(rootDir, moduleGlobals) { banner: "/* @license\r\n" + " * Copyright (c) .NET Foundation. All rights reserved.\r\n" + " * Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\r\n" + - "*/", + " */", globals: moduleGlobals, }, - external: function (m) { - let match = m.match(/node_modules/); - if (match) { - let moduleName = m.substring(match.index + "node_modules".length + 1); - let slashIndex = moduleName.indexOf('/'); - if(slashIndex < 0) { - slashIndex = moduleName.indexOf('\\'); - } - moduleName = moduleName.substring(0, slashIndex); - if(polyfills.indexOf(moduleName) >= 0) { - // This is a polyfill - console.log(`Importing polyfill: ${m}`); - return false; - } - else if(!allowed_externals.indexOf(moduleName)) { - console.log(`WARNING: External module '${m}' in use.`); - } - return true; - } - return false; - }, + // Mark everything in the dependencies list as external + external: Object.keys(pkg.dependencies || {}), + plugins: [ commonjs(), resolve({ diff --git a/client-ts/signalr/README.md b/client-ts/signalr/README.md index fb5c1e60b5..adde540bb2 100644 --- a/client-ts/signalr/README.md +++ b/client-ts/signalr/README.md @@ -3,7 +3,7 @@ JavaScript and TypeScript clients for SignalR for ASP.NET Core ## Installation ```bash -npm install @aspnet/signalr-client +npm install @aspnet/signalr ``` ## Usage @@ -36,7 +36,7 @@ connection.start() ### Example (NodeJS) ```JavaScript -const signalR = require("@aspnet/signalR"); +const signalR = require("@aspnet/signalr"); let connection = new signalR.HubConnection('/chat'); @@ -46,4 +46,4 @@ connection.on('send', data => { connection.start() .then(() => connection.invoke('send', 'Hello')); -``` \ No newline at end of file +```