Previously, the `elements` docs example only worked in browsers that natively supported Custom Elements and ES2015 modules. Furthermore, it didn't work on StackBlitz, because StackBlitz ignores the specified `target` in `tsconfig.json` and uses the UMD bundles (i.e. ES5 code) even on browsers that do support ES2015. (NOTE: In the past, this was not a problem, because we explicitly did not provide a StackBlitz example. This has changed in #36067.) This commit ensures the example works on all browsers and also on StackBlitz by providing the necessary Custom Elements polyfills. Fixes #36532 PR Close #36536
23 lines
573 B
JSON
23 lines
573 B
JSON
{
|
|
"scripts": [
|
|
{ "name": "ng", "command": "ng" },
|
|
{ "name": "build", "command": "ng build" },
|
|
{ "name": "start", "command": "ng serve" },
|
|
{ "name": "test", "command": "ng test" },
|
|
{ "name": "lint", "command": "ng lint" },
|
|
{ "name": "e2e", "command": "ng e2e" }
|
|
],
|
|
"dependencies": [
|
|
"@angular/elements",
|
|
"@webcomponents/custom-elements"
|
|
],
|
|
"devDependencies": [
|
|
"@angular-devkit/build-angular",
|
|
"@angular/cli",
|
|
"@types/jasminewd2",
|
|
"jasmine-spec-reporter",
|
|
"karma-coverage-istanbul-reporter",
|
|
"ts-node"
|
|
]
|
|
}
|