angular-docs-cn/modules/playground
Paul Gschwendtner b1fa1bf0d5 fix(dev-infra): `ng_rollup_bundle` rule should error if import cannot be resolved (#42760)
Rollup just prints a warning if an import cannot be resolved and ends up
being treated as an external dependency. This in combination with the
`silent = True` attribute for `rollup_bundle` means that bundles might
end up being extremely small without people noticing that it misses
actual imports.

To improve this situation, the warning is replaced by an error if
an import cannot be resolved.

This unveiles an issue with the `ng_rollup_bundle` macro from
dev-infra where imports in View Engine were not resolved but ended
up being treated as external. This did not prevent benchmarks using
this macro from working because the ConcatJS devserver had builtin
resolution for workspace manifest paths. Though given the new check
for no unresolved imports, this will now cause errors within Rollup, and
we need to fix the resolution. We can fix the issue by temporarily
enabling workspace linking. This does not have any performance
downsides.

To enable workspace linking (which we might need more often in the
future given the linker taking over patched module resolution), we
had to rename the `angular` dependency to a more specific one so
that the Angular linker could link into `node_modules/angular`.

PR Close #42760
2021-07-09 14:50:14 -07:00
..
e2e_test fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
src fix(dev-infra): `ng_rollup_bundle` rule should error if import cannot be resolved (#42760) 2021-07-09 14:50:14 -07:00
BUILD.bazel build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
README.md build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
favicon.ico build: adding basic e2e testing infrastructure 2016-05-02 08:15:10 -07:00
systemjs-config.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
systemjs-rxjs-operators.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json build: switch playground examples to bazel (#28490) 2019-02-04 16:51:11 -05:00
tsconfig-e2e.json build: run playground e2e examples with bazel (#28490) 2019-02-04 16:51:11 -05:00

README.md

How to serve the examples

All playground examples are built and served with Bazel. Below is an example that demonstrates how a specific example can be built and served with Bazel:

# e.g. src/zippy_component
yarn bazel run modules/playground/src/zippy_component:devserver

# e.g. src/upgrade
yarn bazel run modules/playground/src/upgrade:devserver