Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core(stack-packs): add angular, react, amp, and magento packs #9797

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ const expectations = [
artifacts: {
Stacks: [{
id: 'jquery',
}, {
id: 'jquery',
name: 'jQuery (Fast path)',
}, {
id: 'wordpress',
}],
Expand Down Expand Up @@ -356,6 +359,9 @@ const expectations = [
items: [{
name: 'jQuery',
},
{
name: 'jQuery (Fast path)',
},
{
name: 'WordPress',
}],
Expand Down
93 changes: 93 additions & 0 deletions lighthouse-core/lib/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,99 @@
"lighthouse-core/report/html/renderer/util.js | warningHeader": {
"message": "Warnings: "
},
"stack-packs/packs/amp.js | efficient_animated_content": {
"message": "For animated content, use [amp-anim](https://amp.dev/documentation/components/amp-anim/) to minimize CPU usage while the content remains offscreen."
},
"stack-packs/packs/amp.js | offscreen_images": {
"message": "Ensure that you are you using valid `amp-img` tags for your images which automatically lazy-load outside the first viewport. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/media_iframes_3p/?format=websites#images)."
},
"stack-packs/packs/amp.js | render_blocking_resources": {
"message": "Use tools such as [AMP Optimizer](https://github.com/ampproject/amp-toolbox/tree/master/packages/optimizer) to [server-side render AMP layouts](https://amp.dev/documentation/guides-and-tutorials/optimize-and-measure/server-side-rendering/)."
},
"stack-packs/packs/amp.js | unminified_css": {
"message": "Refer to the [AMP documentation](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/style_pages/) to ensure all your styles are supported."
},
"stack-packs/packs/amp.js | uses_responsive_images": {
"message": "The `amp-img` element supports the `srcset` attribute to specify which image assets to use based on the screen size. [Learn more](https://amp.dev/documentation/guides-and-tutorials/develop/style_and_layout/art_direction/)."
},
"stack-packs/packs/amp.js | uses_webp_images": {
"message": "Consider displaying all your `amp-img` components in WebP formats while specifying an appropriate fallback for other browsers. [Learn more](https://amp.dev/documentation/components/amp-img/#example:-specifying-a-fallback-image)."
},
"stack-packs/packs/angular.js | dom_size": {
"message": "Consider virtual scrolling with the Component Dev Kit (CDK) if very large lists are being rendered. [Learn more](https://web.dev/virtualize-lists-with-angular-cdk/)."
},
"stack-packs/packs/angular.js | total_byte_weight": {
"message": "Apply [route-level code-splitting](https://web.dev/route-level-code-splitting-in-angular/) to minimize the size of your JavaScript bundles. Also, consider precaching assets with the [Angular service worker](https://web.dev/precaching-with-the-angular-service-worker/)."
},
"stack-packs/packs/angular.js | unminified_warning": {
"message": "If you are using Angular CLI, ensure that builds are generated in production mode. [Learn more](https://angular.io/guide/deployment#enable-runtime-production-mode)."
},
"stack-packs/packs/angular.js | unused_javascript": {
"message": "If you are using Angular CLI, include source maps into your production build to inspect your bundles. [Learn more](https://angular.io/guide/deployment#inspect-the-bundles)."
},
"stack-packs/packs/angular.js | uses_rel_preload": {
"message": "Preload routes ahead of time to speed up navigation. [Learn more](https://web.dev/route-preloading-in-angular/)."
},
"stack-packs/packs/angular.js | uses_responsive_images": {
"message": "Consider using the `BreakpointObserver` utility in the Component Dev Kit (CDK) to manage image breakpoints. [Learn more](https://material.angular.io/cdk/layout/overview)."
},
"stack-packs/packs/magento.js | critical_request_chains": {
"message": "If you are not bundling your JavaScript assets, consider using [baler](https://github.com/magento/baler)."
},
"stack-packs/packs/magento.js | disable_bundling": {
"message": "Disable Magento's built-in [JavaScript bundling and minification](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html), and consider using [baler](https://github.com/magento/baler/) instead."
},
"stack-packs/packs/magento.js | font_display": {
"message": "Specify `@font-display` when [defining custom fonts](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html)."
},
"stack-packs/packs/magento.js | offscreen_images": {
"message": "Consider modifying your product and catalog templates to make use of the web platform's [lazy loading](https://web.dev/native-lazy-loading) feature."
},
"stack-packs/packs/magento.js | time_to_first_byte": {
"message": "Use Magento's [Varnish integration](https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish.html)."
},
"stack-packs/packs/magento.js | unminified_css": {
"message": "Enable the \"Minify CSS Files\" option in your store's Developer settings. [Learn more](https://devdocs.magento.com/guides/v2.3/performance-best-practices/configuration.html?itm_source=devdocs&itm_medium=search_page&itm_campaign=federated_search&itm_term=minify%20css%20files)."
},
"stack-packs/packs/magento.js | unminified_javascript": {
"message": "Use [Terser](https://www.npmjs.com/package/terser) to minify all JavaScript assets outfrom from static content deployment, and disable the built-in minification feature."
},
"stack-packs/packs/magento.js | unused_javascript": {
"message": "Disable Magento's built-in [JavaScript bundling](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/js-bundling.html)."
},
"stack-packs/packs/magento.js | uses_optimized_images": {
"message": "Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=optimize%20image) for a variety of third party extensions to optimize images."
},
"stack-packs/packs/magento.js | uses_rel_preconnect": {
"message": "Preconnect or dns-prefetch resource hints can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html)."
},
"stack-packs/packs/magento.js | uses_rel_preload": {
"message": "`<link rel=preload>` tags can be added by [modifying a themes's layout](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/xml-manage.html)."
},
"stack-packs/packs/magento.js | uses_webp_images": {
"message": "Consider searching the [Magento Marketplace](https://marketplace.magento.com/catalogsearch/result/?q=webp) for a variety of third-party extensions to leverage newer image formats."
},
"stack-packs/packs/react.js | dom_size": {
"message": "Consider using a “windowing” library like `react-window` to minimize the number of DOM nodes created if you are rendering many repeated elements on the page. [Learn more](https://web.dev/virtualize-long-lists-react-window/). Also, minimize unecessary re-renders using [shouldComponentUpdate](https://reactjs.org/docs/optimizing-performance.html#shouldcomponentupdate-in-action), [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent), or [React.memo](https://reactjs.org/docs/react-api.html#reactmemo) and [skip effects](https://reactjs.org/docs/hooks-effect.html#tip-optimizing-performance-by-skipping-effects) only until certain dependencies have changed if you are using the Effect hook to improve runtime performance."
},
"stack-packs/packs/react.js | redirects": {
"message": "If you are using React Router, minimize usage of the `<Redirect>` component for [route navigations](https://reacttraining.com/react-router/web/api/Redirect)."
},
"stack-packs/packs/react.js | time_to_first_byte": {
"message": "If you are server-side rendering any React components, consider using `renderToNodeStream()` or `renderToStaticNodeStream()` to allow the client to receive and hydrate different parts of the markup instead of all at once. [Learn more](https://reactjs.org/docs/react-dom-server.html#rendertonodestream)."
},
"stack-packs/packs/react.js | unminified_css": {
"message": "If your build system minifies your CSS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)."
},
"stack-packs/packs/react.js | unminified_javascript": {
"message": "If your build system minifies your JS files automatically, ensure that you are deploying the production build of your application. You can check this with the React Developer Tools extension. [Learn more](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build)."
},
"stack-packs/packs/react.js | unused_javascript": {
"message": "If you are not server-side rendering, [split your JavaScript bundles](https://web.dev/code-splitting-suspense/) with `React.lazy()`. Otherwise, code-split using a third-party library such as [loadable-components](https://www.smooth-code.com/open-source/loadable-components/docs/getting-started/)."
},
"stack-packs/packs/react.js | user_timings": {
"message": "Use the React DevTools Profiler, which makes use of the Profiler API, to measure the rendering performance of your components. [Learn more.](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html)"
},
"stack-packs/packs/wordpress.js | efficient_animated_content": {
"message": "Consider uploading your GIF to a service which will make it available to embed as an HTML5 video."
},
Expand Down
Loading