* test: update ng-packagr builder tests to work on Windows
* build: add ng packagr test large for ivy
* test: fix web-worker test in ivy
Previously, we were not testing web workers under Ivy as we were overriding tsconfig.app.json entirely without including enableIvy.
When enabling Ivy we are getting warning of files that are part of the compilation which causing a warning to show and break the test.
* build: update ng-packagr to `^5.4.0`
* test: display ivy mode message once
With this change we address 2 main issues related to unbound breakpoints:
1) in VS code when having a `baseHref` set.
2) Visual Studio when using an SPA inside a ASP.NET project
For the latter, it seems that there is no way to set a `webRoot`. However, `webpack:///` seems to be handled internally and will be mapped to the `SpaRoot` ie `ClientApp` folder.
Fixes: #15211
`namespace` is always empty which is breaking sourcemaps since when sources start with `/` vscode will not be able to resolve them unless users configure `sourceMapPathOverrides`.
Fixes#15116
It’s very easy to inadvertently import toplevel css in component styles. Since component css is standalone and self-contained, it will never be shared between components and remains as a single large bundle for each component. This in turn adds a large amount of code that must be processed and increases bundle size.
Related to: TOOL-949
At the moment child compilation warnings and errors are being lost as they are not passed to the root compilation. This means that any errors that are being set by clean-css for component styles are being lost.
When a tsconfig without `includes` or `files` all files under the `rootDir` will be included in the compilation. This results in redundant files to inserted as part of the ts compilation which in some cases might reduce the compilation drastically.
Related to: TOOL-949
Webpack and its development server assume the presence of two node builtins (`events` & `querystring`). Do to package hoisting npm/yarn will usually place the shims for those two builtins at locations that webpack find them. This is however not guaranteed nor will it work with pnpm which strictly follows the prescribed dependency tree.
To remedy this, the specific node shims are enabled only for the specific internal webpack files that are used within the development server. This ensures that the requirements of these files does not pollute the entire application.
Fixes#13680
The package is quite large at 33MB (46MB on disk). The package is also only used in one test that is already covered by an E2E test. The E2E test does not require the package to be present for development as the test installs it within a generated project during execution. This also has the benefit of testing the icons package in a more real world use case; as well as allowing the test to serve as a guide for a user to add the package to their own application.
* test: update tests to work with new stricter tsconfig file inclusions
* fix(@schematics/angular): exclusively list the files in tsconfigs
With the omission of `includes` or `files` in tsconfig files tsc will pick up all the files under the rootDir and make them as part of the compilation. In certain cases, redundant files will be picked up which will cause a slower compilations.
Related to: TOOL-949
This change synchronizes the behavior of classic scripts and module scripts (`type="module"`). Module scripts are deferred by default. Also, certain injected scripts are not considered module scripts even in a ES2015+ build due to the strict mode behavior of module scripts. Deferring such scripts also ensures consistent execution in those scenarios.