To avoid the need to perform Node.js resolution for the typical case of a relative
builder schema, a check is now performed to determine if a schema path within the
build manifest appears to be relative.
I suspect there were some versioning changes with the e.g. `hoist =
false` setting in npmrc; so eslint now starts failing about an import
from `webpack-server.ts` resulting in unnecessary type cast lint errors.
The existing mapping didn't work due to the underscore conversion, so
this makes sense, and fixing the path mappings works.
I suspect there were some versioning changes with the e.g. `hoist =
false` setting in npmrc; so eslint now starts failing about this
unnessary type cast. Seems reasonable so this is committed without
deep investigation.
In our dev-infra sync we decided that we want to have less
ambiguous naming for node modules from the workspace root vs. node
modules that are local to the package.
Consider the confusion between: `//:node_modules` and `:node_modules`.
This commit fixes this by naming the workspace `node_modules` as
`:root_modules`. This does not have an effect on runtime of NodeJS
output because `rules_js` continues to lay out the root modules as
`/node_modules` folder; as it should.
It seems that the chunk deterministic name has changed after
recent node module /lock file changes. It's unclear what specifically is
involved in Webpack's chunk name generation, but the output and all
other tests still look good; which makes this is a rather safe update to
the new chunk name. Consulting with CLI team members explained that this
can happen quite often.
This commit updates the architect devkit package code to use
`ts_project`. We specificially don't migrate the jasmine node test yet
as we want to experiment further with the incremental migration.
Previously, the `baseHref` option under each locale allowed for generating a unique base href for specific locales. However, users were still required to handle file organization manually, and `baseHref` appeared to be primarily designed for this purpose.
This commit introduces a new `subPath` option, which simplifies the i18n process, particularly in static site generation (SSG) and server-side rendering (SSR). When the `subPath` option is used, the `baseHref` is ignored. Instead, the `subPath` serves as both the base href and the name of the directory containing the localized version of the app.
Below is an example configuration showcasing the use of `subPath`:
```json
"i18n": {
"sourceLocale": {
"code": "en-US",
"subPath": ""
},
"locales": {
"fr-BE": {
"subPath": "fr",
"translation": "src/i18n/messages.fr-BE.xlf"
},
"de-BE": {
"subPath": "de",
"translation": "src/i18n/messages.de-BE.xlf"
}
}
}
```
The following tree structure demonstrates how the `subPath` organizes localized build output:
```
dist/
├── app/
│ └── browser/ # Default locale, accessible at `/`
│ ├── fr/ # Locale for `fr-BE`, accessible at `/fr`
│ └── de/ # Locale for `de-BE`, accessible at `/de`
```
DEPRECATED: The `baseHref` option under `i18n.locales` and `i18n.sourceLocale` in `angular.json` is deprecated in favor of `subPath`.
The `subPath` defines the URL segment for the locale, serving as both the HTML base HREF and the directory name for output. By default, if not specified, `subPath` will use the locale code.
Closes#16997 and closes#28967
Running the SSR dev server when `browser-sync` is not installed would print the error, but then build the browser and server targets, then hang and never return control to the user until they manually Ctrl+C. This change skips building at all if `browser-sync` is not installed, immediately returning control to the user.
This is a simple workaround, but there are two deeper bugs which would benefit from investigation:
1. Figure out why NPM sometimes doesn't install `browser-sync`. It was happening inconsistently for me when running `ng add @angular/ssr`.
2. Figure out why Architect does not cancel/await targets still executing when a builder completes.
This was missed in the original addition of `ngServerMode` and incorrectly caused `withEventReplay` to run browser-specific code on the server and crash.
This commit removes the `RenderMode.AppShell` option. Instead, a new configuration parameter, `{ appShellRoute: 'shell' }`, is introduced to the `provideServerRoutesConfig` method.
```ts
provideServerRoutesConfig(serverRoutes, { appShellRoute: 'shell' })
```
The Karma file watching was racing with the file writes done by the
application builder. Since we already tell Karma when to reun via
`.refeshFiles()`, disabling Karma's own file watcher should make
things more reliable.
This allows removing a weird special-case in the test case and
removes the noisy "File chaned" logs generated by Karma.
Fixes https://github.com/angular/angular-cli/issues/28755
The development server's `hmr` option will now disable both global and component
stylesheet hot replacement if explicitly disabled. These features are enabled by
default for all projects.
Outside of single-run mode, the karma test provider was expected to
watch for changes. In the application builder branch, we only handled
the case of an explicit `--watch` though. This meant that the karma
runner was kept running but didn't see any file changes.
Fixes https://github.com/angular/angular-cli/issues/28730
The Critters project has been transferred to the Nuxt team, who will now manage its development and has been renamed to Beasties.
See: https://github.com/danielroe/beasties