Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix: UMD included in bundle after treeshaking (#59)
Browse files Browse the repository at this point in the history
Up until 1.3.3 when importing Transport as an ES6 module the UMD module
file would still be included as part of the application bundle as can
be seen by the breakdown from webpack-bundle-analyzer. This PR fixes it
by removing the `main` entry from the package.json which will result in
about 100kB of reduced bundle size.

Signed-off-by: Josh Kim <[email protected]>
  • Loading branch information
jooskim committed Sep 3, 2021
1 parent 8b0e2e5 commit 4484550
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
11 changes: 10 additions & 1 deletion build/npm/transport.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"peerDependencies": {
"rxjs": "^6.4.0"
},
"main": "./transport.umd.min.js",
//@exclude
"scripts": {
"prepare": "echo 'Error: Please run \"npm run prepare\" on the parent project' && exit 1"
Expand All @@ -28,6 +27,16 @@
],
"license": "BSD-2-Clause",
"changelogHistory": [
{
"date": "9/3/21",
"version": "1.3.4",
"notes": [
{
"description": "Fix tree-shaking issue",
"review_uri": "https://github.com/vmware/transport-typescript/pull/59"
}
]
},
{
"date": "8/31/21",
"version": "1.3.3",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vmw/transport",
"version": "1.3.3",
"version": "1.3.4",
"private": false,
"license": "BSD-2-Clause",
"repository": "[email protected]:vmware/transport-typescript.git",
Expand Down
2 changes: 1 addition & 1 deletion src/bus.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { BrokerConnector } from './bridge';
export declare type NgZoneRef = any;

// current version
const version = '1.3.3';
const version = '1.3.4';

export type ChannelName = string;
export type SentFrom = string;
Expand Down

0 comments on commit 4484550

Please sign in to comment.