├── testapp
├── src
│ ├── assets
│ │ └── .gitkeep
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── styles.css
│ ├── index.html
│ ├── app
│ │ ├── app.module.ts
│ │ └── app.component.ts
│ ├── main.ts
│ └── polyfills.ts
├── tsconfig.app.json
├── browserslist
├── tsconfig.json
├── .gitignore
├── README.md
├── package.json
└── angular.json
├── .gitignore
├── .npmignore
├── schematics
├── collection.json
└── ng-add
│ └── index.ts
├── schema.json
├── tsconfig.json
├── README.md
├── package.json
└── index.ts
/testapp/src/assets/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | index.js
3 | *.log
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | testapp
3 | *.ts
4 | *.log
5 | yarn.lock
--------------------------------------------------------------------------------
/testapp/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/testapp/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lacolaco/ngx-web-bundles/HEAD/testapp/src/favicon.ico
--------------------------------------------------------------------------------
/testapp/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/schematics/collection.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3 | "schematics": {
4 | "ng-add": {
5 | "description": "Add my library to the project.",
6 | "factory": "./ng-add/index#ngAdd"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/testapp/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Testapp
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/schema.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json-schema.org/schema",
3 | "type": "object",
4 | "properties": {
5 | "browserTarget": {
6 | "type": "string"
7 | },
8 | "primaryURL": {
9 | "type": "string"
10 | },
11 | "outputPath": {
12 | "type": "string",
13 | "optional": true
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/testapp/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./out-tsc/app",
5 | "types": []
6 | },
7 | "files": [
8 | "src/main.ts",
9 | "src/polyfills.ts"
10 | ],
11 | "include": [
12 | "src/**/*.ts"
13 | ],
14 | "exclude": [
15 | "src/test.ts",
16 | "src/**/*.spec.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/testapp/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 |
4 | import { AppComponent } from './app.component';
5 |
6 | @NgModule({
7 | declarations: [
8 | AppComponent
9 | ],
10 | imports: [
11 | BrowserModule
12 | ],
13 | providers: [],
14 | bootstrap: [AppComponent]
15 | })
16 | export class AppModule { }
17 |
--------------------------------------------------------------------------------
/testapp/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.error(err));
13 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2015",
4 | "module": "commonjs",
5 | "strict": true,
6 | "skipLibCheck": true,
7 | "moduleResolution": "node",
8 | "baseUrl": "./",
9 | "typeRoots": ["node_modules/@types"],
10 | "types": ["node", "jest"],
11 | "esModuleInterop": true,
12 | "forceConsistentCasingInFileNames": true
13 | },
14 | "include": ["index.ts", "schematics"]
15 | }
16 |
--------------------------------------------------------------------------------
/testapp/browserslist:
--------------------------------------------------------------------------------
1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 |
5 | # You can see what browsers were selected by your queries by running:
6 | # npx browserslist
7 |
8 | > 0.5%
9 | last 2 versions
10 | Firefox ESR
11 | not dead
12 | not IE 9-11 # For IE 9-11 support, remove 'not'.
--------------------------------------------------------------------------------
/testapp/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "downlevelIteration": true,
9 | "experimentalDecorators": true,
10 | "module": "esnext",
11 | "moduleResolution": "node",
12 | "importHelpers": true,
13 | "target": "es2015",
14 | "typeRoots": [
15 | "node_modules/@types"
16 | ],
17 | "lib": [
18 | "es2018",
19 | "dom"
20 | ]
21 | },
22 | "angularCompilerOptions": {
23 | "fullTemplateTypeCheck": true,
24 | "strictInjectionParameters": true
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/testapp/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/testapp/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 | # Only exists if Bazel was run
8 | /bazel-out
9 |
10 | # dependencies
11 | /node_modules
12 |
13 | # profiling files
14 | chrome-profiler-events*.json
15 | speed-measure-plugin*.json
16 |
17 | # IDEs and editors
18 | /.idea
19 | .project
20 | .classpath
21 | .c9/
22 | *.launch
23 | .settings/
24 | *.sublime-workspace
25 |
26 | # IDE - VSCode
27 | .vscode/*
28 | !.vscode/settings.json
29 | !.vscode/tasks.json
30 | !.vscode/launch.json
31 | !.vscode/extensions.json
32 | .history/*
33 |
34 | # misc
35 | /.sass-cache
36 | /connect.lock
37 | /coverage
38 | /libpeerconnection.log
39 | npm-debug.log
40 | yarn-error.log
41 | testem.log
42 | /typings
43 |
44 | # System Files
45 | .DS_Store
46 | Thumbs.db
47 |
--------------------------------------------------------------------------------
/testapp/README.md:
--------------------------------------------------------------------------------
1 | # Testapp
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.18.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/testapp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "testapp",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "ng": "ng",
6 | "start": "ng serve",
7 | "build": "ng build",
8 | "test": "ng test",
9 | "lint": "ng lint",
10 | "e2e": "ng e2e",
11 | "gen-bundle": "ng run testapp:gen-bundle"
12 | },
13 | "private": true,
14 | "dependencies": {
15 | "@angular/animations": "~8.2.13",
16 | "@angular/common": "~8.2.13",
17 | "@angular/compiler": "~8.2.13",
18 | "@angular/core": "~8.2.13",
19 | "@angular/forms": "~8.2.13",
20 | "@angular/platform-browser": "~8.2.13",
21 | "@angular/platform-browser-dynamic": "~8.2.13",
22 | "@angular/router": "~8.2.13",
23 | "@lacolaco/ngx-web-bundles": "../",
24 | "rxjs": "~6.4.0",
25 | "tslib": "^1.10.0",
26 | "zone.js": "~0.9.1"
27 | },
28 | "devDependencies": {
29 | "@angular-devkit/build-angular": "~0.803.18",
30 | "@angular/cli": "~8.3.18",
31 | "@angular/compiler-cli": "~8.2.13",
32 | "@angular/language-service": "~8.2.13",
33 | "@types/node": "~8.9.4",
34 | "ts-node": "~7.0.0",
35 | "tslint": "~5.15.0",
36 | "typescript": "~3.5.3"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # @lacolaco/ngx-web-bundles
2 |
3 | # VERY EXPERIMENTAL! BE CAREFUL TO USE!
4 |
5 | Angular CLI builder for generate Web Bundle file (.wbn).
6 | To learn about Web Bundles, read https://web.dev/web-bundles.
7 |
8 | This tool is created for just trying new (experimental) web proposal with Angular CLI, and investigating the design for integration.
9 |
10 | **PLEASE DON'T RELY ON THIS ANYWAY!!**
11 |
12 | ## Usage
13 |
14 | See the `testapp` directory for example.
15 |
16 | ### 1. Install the builder
17 |
18 | ```
19 | $ ng add @lacolaco/ngx-web-bundles
20 | ```
21 |
22 | ### 2. Run it
23 |
24 | Execute the command;
25 |
26 | ```
27 | $ ng run :gen-bundle
28 | ```
29 |
30 | ## Configuration
31 |
32 | After `ng-add`, You can see the architect options in your `angular.json`.
33 |
34 | - `options.browserTarget`: Identify target configuration for building app.
35 | - `options.primaryURL`: Tell the primary URL to the Web Bundle. (used by browser)
36 |
37 | ```
38 | ...
39 | "architect": {
40 | "gen-bundle": {
41 | "builder": "@lacolaco/ngx-web-bundles:generate",
42 | "options": {
43 | "browserTarget": "testapp:build:production",
44 | "primaryURL": "https://ngx-web.bundles" // <= dummy URL
45 | }
46 | },
47 | ...
48 | ```
49 |
--------------------------------------------------------------------------------
/schematics/ng-add/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | Rule,
3 | SchematicContext,
4 | Tree,
5 | SchematicsException,
6 | chain
7 | } from "@angular-devkit/schematics";
8 | import {
9 | getWorkspace,
10 | updateWorkspace
11 | } from "@schematics/angular/utility/config";
12 | import { NodePackageInstallTask } from "@angular-devkit/schematics/tasks";
13 |
14 | // Just return the tree
15 | export function ngAdd(_options: any): Rule {
16 | return (tree: Tree, context: SchematicContext) => {
17 | const workspace = getWorkspace(tree);
18 | const projectName = workspace.defaultProject
19 | ? workspace.defaultProject
20 | : Object.keys(workspace.projects)[0];
21 | const project = workspace.projects[projectName];
22 |
23 | if (project.projectType !== "application") {
24 | throw new SchematicsException(
25 | `Deploy requires an Angular project type of "application" in angular.json`
26 | );
27 | }
28 |
29 | project.architect!["gen-bundle"] = {
30 | builder: "@lacolaco/ngx-web-bundles:generate",
31 | options: {
32 | browserTarget: `${projectName}:build:production`,
33 | primaryURL: `https://ngx-web.bundles/`
34 | }
35 | };
36 |
37 | return chain([
38 | updateWorkspace(workspace),
39 | () => {
40 | context.logger.info(
41 | `gen-bundle architect has successfully installed! Let's execute "ng run ${projectName}:gen-bundle" command!`
42 | );
43 | }
44 | ]);
45 | };
46 | }
47 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@lacolaco/ngx-web-bundles",
3 | "version": "0.2.1",
4 | "description": "Angular CLI builder for generate Web Bundle file (.wbn) ",
5 | "repository": "https://github.com/lacolaco/ngx-web-bundles",
6 | "author": "Suguru Inatomi ",
7 | "license": "MIT",
8 | "private": false,
9 | "builders": "builders.json",
10 | "schematics": "./schematics/collection.json",
11 | "ng-add": {
12 | "save": "devDependencies"
13 | },
14 | "scripts": {
15 | "format": "prettier --write index.ts",
16 | "prepublish": "yarn build",
17 | "build": "tsc"
18 | },
19 | "devDependencies": {
20 | "@angular-devkit/architect": "^0.803.18",
21 | "@angular-devkit/build-angular": "^0.803.18",
22 | "@angular-devkit/core": "^8.3.18",
23 | "@angular-devkit/schematics": "^8.3.18",
24 | "@angular/cli": "^8.3.18",
25 | "@angular/compiler": "^8.2.13",
26 | "@angular/compiler-cli": "^8.2.13",
27 | "@babel/core": "^7.7.2",
28 | "@babel/preset-env": "^7.7.1",
29 | "@babel/preset-typescript": "^7.7.2",
30 | "@types/glob": "^7.1.1",
31 | "@types/jest": "^24.0.23",
32 | "@types/mime": "^2.0.1",
33 | "@types/node": "^12.12.7",
34 | "@types/rimraf": "^2.0.3",
35 | "prettier": "^1.19.1",
36 | "typescript": "~3.5.0"
37 | },
38 | "dependencies": {
39 | "glob": "^7.1.6",
40 | "mime": "^2.4.4",
41 | "rimraf": "^3.0.0",
42 | "wbn": "^0.0.3"
43 | },
44 | "peerDependencies": {
45 | "@angular/cli": ">= 8.3.0"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/testapp/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | template: `
6 |
7 |
8 |
9 | Welcome to {{title}}!
10 |
11 |
{{ title }} app is running!
12 |

13 |
14 | Here are some links to help you start:
15 |
16 | -
17 |
18 |
19 | -
20 |
21 |
22 | -
23 |
24 |
25 |
26 |
27 | `,
28 | styles: []
29 | })
30 | export class AppComponent {
31 | title = 'testapp';
32 | }
33 |
--------------------------------------------------------------------------------
/index.ts:
--------------------------------------------------------------------------------
1 | import {
2 | BuilderContext,
3 | createBuilder,
4 | targetFromTargetString
5 | } from "@angular-devkit/architect";
6 | import {
7 | BrowserBuilderOptions,
8 | executeBrowserBuilder
9 | } from "@angular-devkit/build-angular";
10 | import { JsonObject } from "@angular-devkit/core";
11 | import * as fs from "fs";
12 | import * as glob from "glob";
13 | import * as mime from "mime";
14 | import * as path from "path";
15 | import * as rimraf from "rimraf";
16 | import { BundleBuilder } from "wbn";
17 |
18 | interface Options extends JsonObject {
19 | browserTarget: string;
20 | primaryURL: string;
21 | outputPath: string | null;
22 | }
23 |
24 | async function generateWebBundle(
25 | distDir: string,
26 | primaryURL: string,
27 | output: string
28 | ) {
29 | primaryURL = primaryURL.endsWith("/") ? primaryURL : primaryURL + "/";
30 |
31 | const wbnBuilder = new BundleBuilder(primaryURL);
32 | glob.sync(`${distDir}/*`).forEach(file => {
33 | const requestURL = primaryURL + path.relative(distDir, file);
34 | wbnBuilder.addExchange(
35 | requestURL,
36 | 200,
37 | { "Content-Type": mime.getType(file) || "text/plain" },
38 | fs.readFileSync(file)
39 | );
40 | });
41 | wbnBuilder.addExchange(
42 | primaryURL,
43 | 200,
44 | { "Content-Type": "text/html" },
45 | fs.readFileSync(`${distDir}/index.html`)
46 | );
47 | fs.writeFileSync(path.resolve(distDir, output), wbnBuilder.createBundle());
48 | return;
49 | }
50 |
51 | async function build(options: Options, context: BuilderContext) {
52 | const browserTarget = targetFromTargetString(options.browserTarget);
53 | const browserTargetOptions = ((await context.getTargetOptions(
54 | browserTarget
55 | )) as unknown) as BrowserBuilderOptions;
56 |
57 | context.logger.info(`Initializing.`);
58 | rimraf.sync(browserTargetOptions.outputPath);
59 | context.logger.info(`Building app.`);
60 | const { outputPath } = await executeBrowserBuilder(
61 | {
62 | ...browserTargetOptions,
63 | baseHref: options.primaryURL, // NOTE: workaround for chrome's bug
64 | },
65 | context
66 | ).toPromise();
67 |
68 | context.logger.info(`Generating Web Bundle.`);
69 | const wbnOutputPath =
70 | options.outputPath || path.resolve(outputPath, "out.wbn");
71 | await generateWebBundle(outputPath, options.primaryURL, wbnOutputPath);
72 |
73 | context.logger.info(
74 | `Web Bundle file has been generated at ${wbnOutputPath} .`
75 | );
76 | context.reportStatus(`Done.`);
77 | return { success: true };
78 | }
79 |
80 | export default createBuilder(build);
81 |
--------------------------------------------------------------------------------
/testapp/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "testapp": {
7 | "projectType": "application",
8 | "schematics": {},
9 | "root": "",
10 | "sourceRoot": "src",
11 | "prefix": "app",
12 | "architect": {
13 | "gen-bundle": {
14 | "builder": "@lacolaco/ngx-web-bundles:generate",
15 | "options": {
16 | "browserTarget": "testapp:build:production",
17 | "primaryURL": "https://ngx-web.bundles"
18 | }
19 | },
20 | "build": {
21 | "builder": "@angular-devkit/build-angular:browser",
22 | "options": {
23 | "outputPath": "dist/testapp",
24 | "index": "src/index.html",
25 | "main": "src/main.ts",
26 | "polyfills": "src/polyfills.ts",
27 | "tsConfig": "tsconfig.app.json",
28 | "aot": false,
29 | "assets": [
30 | "src/favicon.ico",
31 | "src/assets"
32 | ],
33 | "styles": [
34 | "src/styles.css"
35 | ],
36 | "scripts": []
37 | },
38 | "configurations": {
39 | "production": {
40 | "fileReplacements": [
41 | {
42 | "replace": "src/environments/environment.ts",
43 | "with": "src/environments/environment.prod.ts"
44 | }
45 | ],
46 | "optimization": true,
47 | "outputHashing": "all",
48 | "sourceMap": false,
49 | "extractCss": true,
50 | "namedChunks": false,
51 | "aot": true,
52 | "extractLicenses": true,
53 | "vendorChunk": false,
54 | "buildOptimizer": true,
55 | "budgets": [
56 | {
57 | "type": "initial",
58 | "maximumWarning": "2mb",
59 | "maximumError": "5mb"
60 | },
61 | {
62 | "type": "anyComponentStyle",
63 | "maximumWarning": "6kb",
64 | "maximumError": "10kb"
65 | }
66 | ]
67 | }
68 | }
69 | },
70 | "serve": {
71 | "builder": "@angular-devkit/build-angular:dev-server",
72 | "options": {
73 | "browserTarget": "testapp:build"
74 | },
75 | "configurations": {
76 | "production": {
77 | "browserTarget": "testapp:build:production"
78 | }
79 | }
80 | },
81 | "extract-i18n": {
82 | "builder": "@angular-devkit/build-angular:extract-i18n",
83 | "options": {
84 | "browserTarget": "testapp:build"
85 | }
86 | }
87 | }
88 | }
89 | },
90 | "defaultProject": "testapp"
91 | }
--------------------------------------------------------------------------------
/testapp/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/guide/browser-support
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
22 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
23 |
24 | /**
25 | * Web Animations `@angular/platform-browser/animations`
26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
28 | */
29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
30 |
31 | /**
32 | * By default, zone.js will patch all possible macroTask and DomEvents
33 | * user can disable parts of macroTask/DomEvents patch by setting following flags
34 | * because those flags need to be set before `zone.js` being loaded, and webpack
35 | * will put import in the top of bundle, so user need to create a separate file
36 | * in this directory (for example: zone-flags.ts), and put the following flags
37 | * into that file, and then add the following code before importing zone.js.
38 | * import './zone-flags.ts';
39 | *
40 | * The flags allowed in zone-flags.ts are listed here.
41 | *
42 | * The following flags will work for all browsers.
43 | *
44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
47 | *
48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
50 | *
51 | * (window as any).__Zone_enable_cross_context_check = true;
52 | *
53 | */
54 |
55 | /***************************************************************************************************
56 | * Zone JS is required by default for Angular itself.
57 | */
58 | import 'zone.js/dist/zone'; // Included with Angular CLI.
59 |
60 |
61 | /***************************************************************************************************
62 | * APPLICATION IMPORTS
63 | */
64 |
--------------------------------------------------------------------------------