790 Commits

Author SHA1 Message Date
Charles Lyding
30536881f9 fix(@angular-devkit/build-angular): set locale identifier when localizing 2019-10-24 12:04:13 -07:00
Charles Lyding
5597f7fedc refactor(@angular-devkit/build-angular): allow control of cache location
`NG_BUILD_CACHE` can specify an absolute path to be used as the cache location.  Caching can also be disabled by setting the variable to 0 or false.
2019-10-23 09:56:49 -07:00
Michael
5260bbb9a3 fix(@angular-devkit/build-angular): sockPath for custom path
Set devServer.sockPath to connect to reloading socket
via custom path when serving the app on a custom path.
2019-10-23 09:56:26 -07:00
Charles Lyding
358bc12856 feat(@angular-devkit/build-angular): support i18n localization for non-differential builds 2019-10-21 13:03:32 -07:00
Charles Lyding
e9279bbe1a fix(@angular-devkit/build-angular): update sourcemaps during localization 2019-10-21 13:03:32 -07:00
Charles Lyding
895fa620a2 feat(@angular-devkit/build-angular): support deprecated i18n options with new configuration 2019-10-21 13:03:32 -07:00
Charles Lyding
bc831e8ff5 feat(@angular-devkit/build-angular): support parallel i18n localization 2019-10-21 13:03:32 -07:00
Charles Lyding
cda57ae0e5 feat(@angular-devkit/build-angular): optimize i18n localize usage in source locale 2019-10-17 10:45:01 -07:00
Charles Lyding
cf116da464 fix(@angular-devkit/build-angular): normalize extract i18n format option 2019-10-17 10:45:01 -07:00
Charles Lyding
9fca29a254 refactor(@angular-devkit/build-angular): use copy file utility in action cache 2019-10-17 10:45:01 -07:00
Charles Lyding
2b41cd1e81 feat(@angular-devkit/build-angular): initial support for i18n translation inlining 2019-10-17 10:45:01 -07:00
Alan Agius
38947d8643 refactor(@angular-devkit/build-angular): remove differential loading version 1.0 2019-10-15 11:22:34 -07:00
Alan Agius
b3086ffd54 fix(@angular-devkit/build-angular): only copy assets outside of webpack when differential loading is needed in build builder
Fixes #15825
2019-10-14 13:42:29 -07:00
Alan Agius
d9bf2dbbda fix(@angular-devkit/build-angular): avoid attempting to copy directories
Avoid copying directly directories, also which this change we cache `fs.existsSync` to optimize copying when a lot of file are being copied to the same destination.

Closes: #15816
2019-10-11 13:53:48 -07:00
Filipe Silva
47490527ff feat(@angular-devkit/build-angular): add experimentalRollupPass (#15690)
In applications that make heavy use of lazy routes and ES2015 libraries, this option can improve bundle sizes. It might also break your bundles in ways we don't understand fully, so please test and report any problems you find.

NOTE: the following are known problems with experimentalRollupPass
- vendorChunk, commonChunk, namedChunks: these won't work, because by the time webpack sees the chunks, the context of where they came from is lost.
- webWorkerTsConfig: workers must be imported via a root relative path (e.g.`app/search/search.worker`) instead of a relative path (`/search.worker`) because of the same reason as above.
- loadChildren string syntax: doesn't work because rollup cannot follow the imports.
2019-10-10 12:39:38 -07:00
Alan Agius
c3169ae7d2 New i18n schema (#15760)
* feat(@angular-devkit/core): update schema to support new i18n options

"projects": {
  "my-app": {
    "projectType": "application",
    "schematics": {},
    "root": "",
    "i18n": {
      "sourceLocale": "en-US",
      "locales": {
        "fr": "src/locale/messages.fr.xlf"
      }
    },
    "sourceRoot": "src",
    ...
  }
}

* feat(@angular-devkit/build-angular): add new i18n options to browser and server builders

With this change we add `translateLocales` as new options for i18n in browser and server builders.

We also deprecate the following options;
* i18nLocale
* i18nFormat
* i18nFile

* feat(@angular-devkit/build-angular): deprecate `i18nFormat` and `i18nLocale` options of `extract-i18n` builder

Option `i18nFormat` has been deprecated in favor of `format` and `i18nLocale` option has been deprecated in favor of the `sourceLocale` sub option of the `i18n` project level option.

* feat(@angular/cli): add alias of `i18n-extract` for `x18n` command

* refactor: rename `translateLocales` to `localize`
2019-10-10 12:39:00 -07:00
Charles
2dc885304b refactor(@angular-devkit/build-angular): reorganize bundle processing for browser builder (#15776) 2019-10-09 11:25:23 -07:00
Charles
3a44611483 refactor(@angular-devkit/build-angular): initial copy-on-write asset processing support (#15788)
This is currently only supported when performing a differential loading build (no watch mode).  This will eventually be expanded to cover watch mode and non-differential loading builds.
2019-10-09 11:07:31 -07:00
Alan Agius
4d2ef2bf57 feat(@angular-devkit/build-angular): add support for i18n extraction with Ivy (#15796)
Re-enable i18n extraction in Ivy by using the legacy VE compiler.
2019-10-09 11:04:48 -07:00
Nikita Potapenko
645b60192b fix(@angular/cli): initialize baseUrl variable
baseUrl is not provided to protractor config because it was undefined
2019-10-03 14:40:57 -07:00
Charles Lyding
72d1bf3c52 refactor(@angular-devkit/build-angular): support reading i18n project options 2019-10-03 14:40:31 -07:00
Charles Lyding
1cefbc6974 refactor(@angular-devkit/build-angular): process bundle code quality improvements 2019-10-03 14:40:31 -07:00
cexbrayat
fa8216c217 fix(@angular-devkit/build-angular): re-introduce pure_getters
PR #15607 removed the `_pure_getters` optimization as it no longer has effect on the framework size.
But it does have an effect on third party library.

For example a simple project using `@ng-bootstrap/ng-bootstrap` goes from `444K` uncompressed with CLI `9.0.0-next.5` to `488K` with CLI `9.0.0-next.6` which introduced the removal.
2019-10-03 14:29:24 -07:00
TinyMan
c5869f57bc feat(@angular-devkit/build-angular): set document locale when using i18nLocale
Fixes #8102
2019-10-02 10:55:15 -07:00
Charles Lyding
941c6af1ed fix(@angular-devkit/build-angular): downlevel with non-loose ECMA compliance
This ensures that the ES5 bundles operate consistently with the ES2015+ bundles.

Fixes #15673
2019-09-30 10:09:54 -07:00
Filipe Silva
102cd86a8e fix(@angular-devkit/build-angular): don't double process factory files 2019-09-27 14:43:38 -07:00
Charles Lyding
190f80cf58 refactor(@angular-devkit/build-angular): optimize bundle process cache detection
This causes the cache checking to stop on the first miss since all required entries must be present for a bundle to be considered cached.
2019-09-27 14:41:08 -07:00
Charles Lyding
dd2a6947ff refactor(@angular-devkit/build-angular): improve performance of parallel bundle processing 2019-09-27 14:41:08 -07:00
Charles Lyding
d3e4dfa0c0 fix(@angular-devkit/build-angular): display accurate sizes for downlevelled files
Fixes #15425
2019-09-26 10:00:35 -07:00
Charles Lyding
8dd67cd3cb fix(@angular-devkit/build-angular): inject correct SRI values in downlevel bundles
Fixes #15468
2019-09-26 10:00:35 -07:00
Charles Lyding
d73a098900 refactor(@angular-devkit/build-angular): account for disabled mangling in downlevel cache 2019-09-26 10:00:35 -07:00
Alan
18fb7faf10 feat(@angular-devkit/build-angular): deprecate lazyModules option
String form of lazy loading and SystemJsNgModuleLoader are deprecated, and this is part of its usage.

See: https://angular.io/api/core/SystemJsNgModuleLoader#systemjsngmoduleloader
2019-09-25 09:47:14 -07:00
Charles Lyding
ffd153a6a2 refactor(@angular-devkit/build-angular): use project metadata in builders
This eliminates the need to manually read a workspace file and removes the use of the experimental workspace API from the package.
2019-09-24 13:18:33 -07:00
Alan Agius
ab5b1909d6 build: update rxjs to 6.5.3 2019-09-24 13:18:09 -07:00
Alan Agius
d9f0bd5f34 fix(@angular-devkit/build-angular): remove pure_getters
Closes #14316
2019-09-24 13:18:09 -07:00
Charles Lyding
8a4bc54ef3 fix(@angular-devkit/build-angular): workaround Node.js copyFile defect on macOS
Fixes #15544
2019-09-19 14:42:04 -07:00
Charles Lyding
a6b496d4ff fix(@angular-devkit/build-angular): use manual sourcemap processing for large sourcemaps
Mitigates #15493
2019-09-19 14:41:45 -07:00
Charles Lyding
e4444121d1 fix(@angular-devkit/build-angular): always use ECMA 5 optimizations with terser
There appears to be defects related to terser's ECMA 6 options.  The optimizations present a minima size improvement in general.  Further investigation is required to determine the underlying cause within terser.

Fixes #15580
2019-09-19 14:40:31 -07:00
Alan Agius
1ea4a5ffa5 feat(@angular-devkit/build-angular): ignore express and hapi depedency expresstion (#15586)
In version 9 universal express and hapi `server.ts` will be bundled using the CLI server builder.

We need to add this to avoid `the request of a dependency is an expression` warnings

See: https://github.com/angular/universal/pull/1237
2019-09-12 11:44:32 -07:00
Charles Lyding
b9f69d6796 fix(@angular-devkit/build-angular): fully optimize script bundles with bundle downleveling
This also allows terser to perform ECMA 6 level compress optimizations on the actual application bundles (non-script bundles) which can provide for further size improvements.

Fixes #15507
2019-09-10 11:07:36 -07:00
Alan Agius
3fc86b7ff5 Merge pull request #15530 from alan-agius4/protractor_base_url
fix(@angular-devkit/build-angular): add trailing back slash to protr…
2019-09-10 10:07:44 -07:00
Alan
fb0a6af9f0 fix(@angular-devkit/build-angular): make app-shell work with Ivy
Fixes #15383
2019-09-10 10:01:50 -07:00
Alan
fb24f30202 feat(@angular-devkit/build-angular): enable bundleDependencies by default for server builder
BREAKING CHANGE: bundleDependencies default value has been changed from none to all. This will result in all of node_modules to be bundled in the final server bundle.

Under Ivy, if users choose to opt-out from bundling dependencies they will need to run NGCC binary manually to make non-bundled node_modules compatible with Ivy.
2019-09-10 10:01:50 -07:00
Charles Lyding
9300627e22 fix(@angular-devkit/build-angular): disable extract comments for webpack terser plugin
terser-webpack-plugin 2.0.0+ enables the extract comments option by default which is not used by the CLI.
2019-09-10 10:01:25 -07:00
noeri
366e51be04 feat(@angular-devkit/build-angular): expose webpack-dev-server's allowedHosts option
Closes #13656
2019-09-09 14:09:58 -07:00
Alan Agius
5e1b3785f6 fix(@angular-devkit/build-angular): fix permission errors for ES5 bundles
copyFilesSync will also copy permissions which may result in permissions errors.

Closes #15490
2019-09-05 00:27:39 +05:30
Alan Agius
2c8b12f45c feat(@angular-devkit/build-angular): update sass-loader to 8.0.0
Full list of changes https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md#800-2019-08-29
2019-09-05 00:24:32 +05:30
Alan Agius
c935211aef fix(@angular-devkit/build-angular): several issues with optimization and bundleDependencies in universal
Fixes #15498
2019-09-04 02:31:20 +05:30
Filipe Silva
6a29ce47a1 test: add issue for broken app-shell test 2019-08-30 22:53:46 +05:30
Alan Agius
058299c531 fix(@angular-devkit/build-angular): remove deprecation of baseUrl in protractor builder
Closes #13952
2019-08-30 00:15:10 +05:30