10 Commits

Author SHA1 Message Date
Charles Lyding
6b2a8e175e refactor(@angular-devkit/build-angular): remove virtualfs host usage from browser/dev-server
The virtualfs Host was only used for exist and directory checks during asset and file replacement option normalization within the browser and dev-server builders.
2021-01-20 10:27:43 -05:00
Alan Agius
eb30a92e8a feat(@angular-devkit/build-angular): enable inlining of critical CSS optimizations
This is another feature that we mentioned in the Eliminate Render Blocking Requests RFC (#18730)

Inlining of critical CSS is turned off by default. To opt-in this feature set `inlineCritical` to `true`.

Example:
```json
"configurations": {
  "production": {
    "fileReplacements": [
      {
        "replace": "src/environments/environment.ts",
        "with": "src/environments/environment.prod.ts"
      }
    ],
    "optimization": {
      "styles": {
        "minify": true,
        "inlineCritical": true,
       }
    },
```

To learn more about critical CSS see;
https://web.dev/defer-non-critical-css
https://web.dev/extract-critical-css/

In a future version of the Angular CLI `inlineCritical` will be enabled by default.

Closes: #17966
Closes: #11395
Closes: #19445
2020-12-04 15:41:29 -05:00
Alan Agius
0d10de5cbb refactor(@angular-devkit/build-angular): re-structure folder structure and move code
Previous
```
packages/angular_devkit/build_angular
├── plugins
│   └── webpack
└── src
    ├── angular-cli-files
    │   ├── models
    │   │   └── webpack-configs
    │   ├── plugins
    │   └── utilities
    │       ├── index-file
    │       └── service-worker
    ├── app-shell
    ├── browser
    │   └── specs
    ├── dev-server
    ├── extract-i18n
    ├── karma
    ├── ng-packagr
    ├── protractor
    ├── server
    ├── tslint
    ├── utils
    └── webpack
        └── models
```

Now
```
packages/angular_devkit/build_angular
├── plugins
└── src
    ├── app-shell
    ├── browser
    │   └── specs
    ├── dev-server
    ├── extract-i18n
    ├── karma
    ├── ng-packagr
    ├── protractor
    ├── server
    ├── tslint
    ├── utils
    │   └── index-file
    └── webpack
        ├── configs
        ├── plugins
        └── utils
```
2020-09-14 16:40:39 -04:00
Alan Agius
8fb7e586cc refactor(@angular-devkit/build-angular): remove deprecated evalSourceMap, vendorSourceMap, profile and skipAppShell options
BREAKING CHANGE:

The following deprecated devkit builders options have been removed:
- `skipAppShell:` This has no effect
- `evalSourceMap`: This done to improve performance in older versions of the CLI and is no longer needed
- `vendorSourceMap`: Use `sourceMap.vendor` instead
- `profile`: Use `NG_BUILD_PROFILING` environment variable instead
2020-04-27 15:08:15 -07:00
Fabian Wiles
bc5ce395e5
Merge pull request #16648 from Toxicable/preserve-symlink-nodejs
feat(@angular-devkit/build-angular): default to NodeJS value for pres…
2020-03-23 14:18:27 -07:00
Charles
af9a8b75ee fix(@angular-devkit/build-angular): default poll value when not present (#15417)
`--poll` is a valid command line option (vs. `--poll 1000`).  This however will result in a value of 0 which causes polling to be disabled rather than enabled.  This change sets a default value of 500 when the commandline flag is used.
2019-08-23 11:37:48 -07:00
Hans Larsen
78f5c287d8 refactor(@angular-devkit/build-angular): clean up some interfaces and schemas
Remove the manually maintained schema.d.ts from the browser builder, and use
the Schema JSON file to generate it. This had a lot of repercussions around
the whole build-angular code base and the different interfaces that were
manually kept.
2019-02-21 16:20:54 -08:00
Alan
d10f125cc1 fix(@angular-devkit/build-angular): vendorSourceMap not being recognized when passed directly
Fixes #13414
2019-01-14 11:08:20 -08:00
Alan Agius
eaad125da9 refactor: normalizeFileReplacements and normalizeAssetPatterns no longer use rxjs 2018-12-06 11:44:27 -08:00
Alan Agius
af67b49342 refactor: clean up how to generate normalized build options and improve type safety 2018-12-06 11:44:27 -08:00