468 Commits

Author SHA1 Message Date
Filipe Silva
ef7a07050a test(@angular-devkit/build-angular): build and test with Bazel 2020-04-30 15:12:46 -07:00
Alan Agius
a93f4f0a9f fix(@angular-devkit/build-angular): disable inline svg optimizations
SVGO can cause optimizations which are not compatible in all browsers.

FIxes: #17564
2020-04-29 10:16:16 -07:00
Pete Bacon Darwin
b3792deaae fix(@angular-devkit/build-angular): the path to source_file_utils changed in v10.0.0 2020-04-29 10:15:59 -07: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
Charles Lyding
254994db85 fix(@angular-devkit/build-angular): ensure webpack tilde resolve behavior for stylesheet resources 2020-04-27 11:07:58 -07:00
Charles Lyding
c034477dc5 feat(@angular-devkit/build-angular): rebase relative stylesheet assets when using preprocessors
Previously, when using a preprocessor, resources (e.g., `url(./my-image.jpg)`) referenced in a stylesheet that was imported into another stylesheet would retain the exact URL.  This would be problematic as the resource would not be at the relative location within the new combined stylesheet.  With this change the resource URLs will now be adjusted to reference the origin location of the resource.  This allows the resources to be found without any additional changes to the application or build process.
CSS and Less already functioned in this manner. This change brings Sass and Stylus to parity.

Fixes: #12797
2020-04-27 11:07:58 -07:00
Alan Agius
69aa460335 refactor(@angular-devkit/build-angular): remove deprecated es5BrowserSupport build option
BREAKING CHANGE
Deprecated browser builder option `es5BrowserSupport` has been removed. The inclusion for ES5 polyfills will be determined from the browsers listed in the browserslist configuration.
2020-04-22 10:38:19 -07:00
Alan Agius
710cf5656e fix(@angular-devkit/build-angular): retain css declarations order when using extractCss and @import rule
Relevant code:
239e43d1f3/src/plugins/postcss-import-parser.js (L9)

239e43d1f3/src/index.js (L132-L150)

Fixes #9475
2020-04-10 09:56:55 -07:00
Doug Parker
863067cbd8 revert: "fix(@angular-devkit/build-angular): suppress duplicate 3rdpartylicenses.txt warning"
This reverts commit 59c9802d2667db71ef44aa78c7d56b4caa6ff065.

No longer necessary to suppress this log, now that the root cause has been fixed.
2020-04-08 13:16:54 -07:00
Renovate Bot
bd582591dc build: update rollup to version 2.3.4 2020-04-08 13:16:54 -07:00
Charles Lyding
44b3cc7c89 feat(@angular-devkit/build-angular): provide webpack support for resolving via Yarn PnP 2020-04-07 19:42:00 -07:00
Charles Lyding
8a3e655845 fix(@angular-devkit/build-angular): avoid overwriting localize sourcemaps 2020-04-06 10:00:00 -07:00
Alan Agius
10e7eb2c24 test: change browserslist file name to .browserslistrc 2020-04-06 09:58:42 -07:00
Alan Agius
bd789f5dd6 refactor(@angular-devkit/build-angular): remove deprecation of namedChunks
Previusly this option didn't have an effect on platform server because when targetting commonjs all chunks will be concatenated into main.js.

We now changed the module to esnext, which enables us to have lazy loading on the server.
2020-04-02 10:25:04 -07:00
Alan Agius
a75f5dbc71 fix(@angular-devkit/build-angular): don't show commonjs usage for webpack-dev-server utils 2020-03-30 10:23:52 -07:00
Alan Agius
cad8154ba3 feat(@angular-devkit/build-angular): change tslint default formatter to stylish
Change the default tslint formatter  to stylish as offers a better output
2020-03-23 17:27:35 -07:00
Charles Lyding
2e8420390d fix(@angular-devkit/build-angular): improve quality of localized sourcemaps
Fixes: #17131
2020-03-23 17:26:31 -07:00
Charles Lyding
d2dce463d0 fix(@angular-devkit/build-angular): reduce fast sourcemap threshold
High fidelity sourcemap processing can be expensive for larger bundle sizes.  This reduces the threshold to the original 500KB value to improve performance.
2020-03-23 17:25:07 -07:00
Alan Agius
ea11c5549a feat(@angular-devkit/build-angular): show warnings when depending on CommonJS.
Depending on CommonJS modules is know to cause optimization bailouts. With this change when running a browser build and scripts optimization is enabled we display a warning.

To suppress the warning for a particular package, users can use the `allowedCommonJsDepedencies` builder options.

Example:
```
"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "options": {
    ...
    "allowedCommonJsDepedencies": ["bootstrap"]
  },
}
```

Reference: TOOL-1328
2020-03-23 14:20:21 -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 Lyding
f0bada1925 fix(@angular/cli): allow for private use language subtags
Fixes:  #17163
2020-03-16 21:44:42 -07:00
Wojciech Okoński
237bade5d5 fix(@angular-devkit/build-angular): add missing styles extensions in anyComponentStyle budget
Make anyComponentStyle budged work with all style extensions. Previously it was working only with css styles. Files with other extensions were ignored.
2020-03-16 21:43:44 -07:00
Alan Agius
2e8c7cd23b fix(@angular-devkit/build-angular): add defaults to reduce methods in bundle calculator
Fixes #17215
2020-03-13 13:16:56 -07:00
Charles Lyding
a5aefa1258 refactor(@angular-devkit/build-angular): temporarily disable plugin based localization 2020-03-13 13:14:58 -07:00
Alan Agius
1a1ceb609b build: update angular packages to 9.1.0-next.4 and TypeScript 3.8 2020-03-11 10:33:38 -07:00
Charles Lyding
f5789f466f fix(@angular-devkit/build-angular): ensure live-reload shim workaround isolation
This change reduces the workaround to a single file location as well as ensuring that only the shims of interest from the two necessary live reload files are affected.  This makes sure that build and serve behavior is the same in this regard.
2020-03-10 11:57:31 -07:00
Alan Agius
81d057a37d refactor(@angular-devkit/build-angular): use @jsdevtools/coverage-istanbul-loader instead of coverage-istanbul-loader
`coverage-istanbul-loader` has been deprecated in favor of `@jsdevtools/coverage-istanbul-loader`
2020-03-09 10:24:25 -07:00
Charles Lyding
ad9d73d0d2 fix(@angular-devkit/build-angular): provide locale data discovery fallbacks
This synchronizes the behavior with the FW's wherein the language code will be used if the data for the full locale is not found. The user will still be notified in the event this occurs.
2020-03-05 11:33:52 -08:00
Alan Agius
e414d9b44a fix(@angular-devkit/build-angular): generate ES5 code in ES5 bundles for default browserslist configuration 2020-03-05 11:30:23 -08:00
Sachin Grover
14dc4fb818 fix(@angular-devkit/build-angular): allow function in filename while changing the name of compiling chunks
Fixes angular#17087
2020-02-26 12:26:45 -08:00
Alan Agius
94c753c1a5 fix(@angular-devkit/build-angular): limit the amount of CPUs used by workers
See: https://github.com/angular/angular-cli/issues/16860#issuecomment-588828079
2020-02-25 10:28:25 -08:00
Alan Agius
d29d40370a fix(@angular-devkit/build-angular): fix autoprefixer comments support in scss
Change Scss output style to `expanded` as otherwise sass will remove comments that are needed for autoprefixer when webpack is in prod mode because of the following implementation in `sass-loader`:
See: 45ad0be172/src/getSassOptions.js (L68-L70)

Fixes #17041
2020-02-24 12:52:12 -08:00
Alan Agius
4e65705205 fix(@angular-devkit/build-angular): baseHref with protocol and localize option
`posix.join` will dedupe double forward slashes resulting in incorrect protocol.

Closes: #17029
2020-02-24 12:39:47 -08:00
Sachin Grover
764b977de4 fix(@angular/cli): expand locale pattern in all schemas for all cases
Fixes: #17032
2020-02-24 12:39:35 -08:00
Charles Lyding
5bd3b911ce refactor(@angular-devkit/build-angular): use localize babel plugins directly
With recent improvements in the performance of babel parsing and AST traversal, the localize babel plugins can now be leveraged directly.
2020-02-19 10:08:55 -08:00
Filipe Silva
a5bc1cd15b fix(@angular-devkit/build-angular): limit CPUs used by terser-webpack-plugin
Should help with https://github.com/angular/angular-cli/issues/16860#issuecomment-585751187
2020-02-18 12:44:01 -08:00
Jonathan Garvey
d6c9693952 feat(@angular-devkit/build-angular): pass "grep" and "invertGrep"
Pass the "grep" and "invertGrep" flags through to the Angular Protractor
builder as "jasmineNodeOpts" so that individual specs within an E2E test
file can be targeted.

Fixes #13020
2020-02-18 10:53:27 -08:00
EmaGht
2f1a9db872 fix(@angular-devkit/build-angular): Correctly prints the size of the chunk during the build statistic print.
Fixes: #16627
2020-02-13 15:51:48 -08:00
Charles Lyding
5a53b84f96 fix(@angular-devkit/build-angular): insert sourcemap source content when using fast path 2020-02-13 15:50:58 -08:00
Charles Lyding
6091879428 fix(@angular-devkit/build-angular): generate correct filenames when targeting ESNext
Fixes: #16906
2020-02-12 12:01:42 -08:00
Charles Lyding
c5156977f2 fix(@angular-devkit/build-angular): provide explicit return type for extract-i18n builder
Fixes: #16934
2020-02-12 12:01:32 -08:00
Alan Agius
d0ede14918 refactor: remove safari nomodule polyfills as it's unsupported 2020-02-11 08:47:20 -08:00
Charles Lyding
3c771d1b56 fix(@angular-devkit/build-angular): only remove localize polyfill if in AOT mode
Fixes: #16890
2020-02-11 08:46:40 -08:00
Sachin Grover
e5061ef252 fix(@angular-devkit/build-angular): correct maximum budget size message
WARNING in budgets exceeded message showing wrong number

Fixes angular#16871.
2020-02-10 16:05:03 -08:00
Charles Lyding
3595cee14d fix(@angular-devkit/build-angular): resolve webdriver-manager from protractor location
The webdriver-manager package is a direct dependency of protractor.  The only guaranteed method to resolve the webdriver-manager package in this case is to resolve it from a base of the protractor location.
2020-02-06 09:09:21 -08:00
Alan Agius
a2c0532ca7 fix(@angular-devkit/build-angular): provide supported browsers to babel
By default the browserslist `configPath` will default to `process.cwd()`. This might return incorrect data in a multi app workspace setup.

https://babeljs.io/docs/en/babel-preset-env#configpath
2020-02-04 07:29:27 -08:00
Charles Lyding
9c4da54b63 refactor(@angular-devkit/build-angular): remove redundant ES2015 string polyfills 2020-02-04 07:27:33 -08:00
Charles Lyding
878e4473e0 fix(@angular-devkit/build-angular): use translation file in bundle hash calculations
This change ensures that any changes to translation files is represented in the output file names when output hashing is enabled.  This prevents the situation where a translation file only change to an application would result in built files with no change in output name.
2020-02-04 07:26:41 -08:00
Alan Agius
c3aa081ef7 fix(@angular-devkit/build-angular): add crossorigin attribute to lazy chunks
Fixes #16801
2020-02-03 17:29:58 -08:00
Charles Lyding
52a74a841c fix(@angular-devkit/build-angular): remove unneeded regex polyfills 2020-01-30 11:23:40 -08:00