Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bazel): update bazel-schematics to use Ivy and new rollup_bundle (…
…#33435) Note: the @angular/bazel schematic now appends the package.json "script" field with 'ngcc --properties es2015 browser module main'. If there is an existing script field with ngcc then the schematic modifies it in place removing `--first-only` and `--create-ivy-entry-points`. ViewEngine sources under node_modules need to be updated in-place for Bazel as it does not know how to use the `__ivy__` entry points that are created by the non-bazel `ngcc` command that is added to "scripts" :`ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points`. PR Close #33435
- Loading branch information
1 parent
ba0c178
commit bf913cc
Showing
11 changed files
with
121 additions
and
117 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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
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
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
29 changes: 0 additions & 29 deletions
29
packages/bazel/src/schematics/ng-add/files/angular-metadata.tsconfig.json.template
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
packages/bazel/src/schematics/ng-add/files/src/main.dev.ts.template
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {platformBrowser} from '@angular/platform-browser'; | ||
import {AppModuleNgFactory} from './app/app.module.ngfactory'; | ||
import {AppModule} from './app/app.module'; | ||
|
||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); | ||
platformBrowser().bootstrapModule(AppModule); |
4 changes: 2 additions & 2 deletions
4
packages/bazel/src/schematics/ng-add/files/src/main.prod.ts.template
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import {enableProdMode} from '@angular/core'; | ||
import {platformBrowser} from '@angular/platform-browser'; | ||
import {AppModuleNgFactory} from './app/app.module.ngfactory'; | ||
import {AppModule} from './app/app.module'; | ||
|
||
enableProdMode(); | ||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory); | ||
platformBrowser().bootstrapModule(AppModule); |
11 changes: 11 additions & 0 deletions
11
packages/bazel/src/schematics/ng-add/files/src/rollup.config.js.template
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,11 @@ | ||
const node = require('rollup-plugin-node-resolve'); | ||
const commonjs = require('rollup-plugin-commonjs'); | ||
|
||
module.exports = { | ||
plugins: [ | ||
node({ | ||
mainFields: ['browser', 'es2015', 'module', 'jsnext:main', 'main'], | ||
}), | ||
commonjs(), | ||
], | ||
}; |
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
Oops, something went wrong.