-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Add build target for jsaction contract binary. (#55319)
Right now this binary sits at 9.5kb. Additional changes to the library will be done to reduce the binary size, such as converting event_type from an enum to an object, and other code size reductions. PR Close #55319
- Loading branch information
1 parent
7d5bc1c
commit bce5e23
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/core/primitives/event-dispatch/contract_binary.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
|
||
import {bootstrapEventContract} from './src/register_events'; | ||
|
||
(window as any)['__jsaction_bootstrap'] = bootstrapEventContract; |
20 changes: 20 additions & 0 deletions
20
packages/core/primitives/event-dispatch/terser.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"ecma": "es2020", | ||
"compress": { | ||
"toplevel": true, | ||
"passes": 2, | ||
"pure_getters": true | ||
}, | ||
"mangle": { | ||
"toplevel": true, | ||
"properties": true, | ||
"keep_classnames": false, | ||
"keep_fnames": false | ||
}, | ||
"format": { | ||
"ecma": "es2020", | ||
"ascii_only": true, | ||
"wrap_func_args": false, | ||
"comments": false | ||
} | ||
} |