Meta tags:
description= The web development framework for building modern apps.;
author= Angular Team;
keywords= Angular framework, TypeScript, web development, hydration, Signals, standalone components, accessibility, performance;
Headings (most frequently used words):
configuring, community, building, angular, apps, on, this, page, output, directory, size, budgets, commonjs, dependencies, browser, compatibility, tailwind, critical, css, inlining, social, media, resources, translations,
Text of the page (most frequently used words):
the (79), angular (55), for (28), build (28), and (21), size (21), application (20), bundle (19), cli (16), this (15), baseline (14), your (13), with (13), css (11), you (11), use (11), name (11), #browser (10), type (10), not (9), that (9), budget (9), builder (8), commonjs (8), relative (8), can (7), browsers (7), which (7), threshold (7), initial (6), default (6), more (6), set (6), warning (6), output (6), new (6), google (5), code (5), tailwind (5), browserslist (5), configuration (5), project (5), javascript (5), json (5), modules (5), when (5), budgets (5), error (5), value (5), developer (4), generated (4), uses (4), option (4), options (4), see (4), using (4), configuring (4), target (4), supported (4), will (4), dependency (4), dependencies (4), maximumerror (4), maximumwarning (4), any (4), client (4), side (4), esbuild (4), apps (4), v22 (3), specific (3), versions (3), file (3), directory (3), ensure (3), automatically (3), polyfills (3), web (3), support (3), bundles (3), example (3), errors (3), following (3), defaults (3), values (3), one (3), each (3), used (3), libraries (3), library (3), server (3), building (3), schematics (3), updated (3), licensed (2), under (2), documentation (2), built (2), style (2), community (2), youtube (2), needed (2), into (2), html (2), display (2), content (2), styles (2), critical (2), disable (2), inlining (2), first (2), supports (2), compatible (2), how (2), list (2), only (2), generate (2), matches (2), compatibility (2), does (2), feature (2), however (2), add (2), allowedcommonjsdependencies (2), warnings (2), ecmascript (2), best (2), these (2), module (2), also (2), larger (2), information (2), esm (2), specified (2), language (2), formats (2), warns (2), grows (2), beyond (2), main (2), filename (2), patterns (2), admin (2), 250kb (2), configure (2), lazy (2), loaded (2), min (2), max (2), minimum (2), maximum (2), erroring (2), entire (2), all (2), corresponds (2), shown (2), summary (2), 500kb (2), total (2), details (2), entry (2), given (2), specify (2), app (2), particular (2), parts (2), define (2), boundaries (2), applications (2), grow (2), page (2), architect (2), packagr (2), builds (2), devkit (2), time (2), builders (2), tools (2), aot (2), end (2), testing (2), workers (2), service (2), animations (2), release (2), setup (2), docs (2), menu (2), super, powered, 2010, 2026, sha, ff0068a, mit, license, 正體中文版, 简体中文版, 日本語版, 한국어, русский, türkçe, oʻzbekcha, français, español, azərbaycanca, translations, roadmap, press, kit, resources, experts, devlibrary, report, issues, conduct, contribute, stack, overflow, github, discord, bluesky, formerly, twitter, blog, social, media, optimization, extracts, render, viewport, inlines, directly, allowing, faster, without, waiting, full, stylesheets, load, remaining, then, loads, asynchronously, background, analyze, beasties, inline, definitions, improve, enabled, customization, contentful, paint, fcp, integrate, utility, framework, query, browsersl, ist, helpful, examples, avoid, expanding, even, broadly, itself, might, should, ever, reduce, repository, override, internal, run, generates, matching, browserslistrc, config, current, major, version, different, depending, transform, certain, features, has, been, implemented, supplement, missing, apis, lodash, outputs, detects, depends, encounter, consider, asking, maintainer, contributing, yourself, alternative, meets, needs, adding, located, importing, prevent, bundlers, minifiers, from, optimizing, those, effectively, results, sizes, making, always, prefer, native, throughout, its, fully, standard, strong, static, analysis, makes, optimizations, powerful, than, other, 240kb, 220kb, 200kb, shows, field, emitted, wildcard, regular, expression, such, 300kb, minimumerror, minimumwarning, comparison, are, calculated, reported, script, anyscript, component, stylesheet, 4kb, 8kb, anycomponentstyle, scripts, allscript, bootstrapping, 1mb, together, including, property, object, properties, reports, part, reaches, exceeds, boundary, percentage, valid, megabytes, 123mb, kilobytes, 123kb, bytes, 123b, 123, configures, measures, bootstrap, production, configurations, section, configured, environment, functionality, they, lets, thresholds, stay, within, result, process, dist, project_name, back, top, arrow_upward_alt, discusses, usage, test, serve, invokes, named, projects, determine, being, looking, adhering, package, format, webpack, node, prerendered, routes, purpose, executes, includes, four, typically, targets, command, compile, typescript, well, optimize, minify, appropriate, metadata, ahead, compilation, template, checking, authoring, generating, environments, migrating, system, deployment, serving, development, local, overview, arrow_back, material, cdk, player, pay, maps, fire, custom, pipeline, pwas, rxjs, legacy, ngmodules, extended, ecosystem, v21, events, keeping, date, performance, unhandled, accessibility, security, guide, practices, devtools, webmcp, design, tutor, mcp, agent, skills, llm, prompts, ide, get, started, drag, drop, internationalization, aria, hybrid, rendering, http, forms, routing, injection, directives, templates, components, signals, depth, guides, start, coding, essentials, installation, what, introduction, more_horiz, reference, playground, tutorials, close, skip,
Text of the page (random words):
building angular apps angular skip to main content menu close v22 k docs tutorials playground reference more_horiz menu docs introduction what is angular installation essentials start coding in depth guides signals updated components templates directives dependency injection updated routing forms updated http client server side hybrid rendering testing angular aria new internationalization animations drag and drop build with ai get started llm prompts and ai ide setup agent skills new angular cli mcp server setup angular ai tutor design patterns webmcp new developer tools angular cli libraries devtools language service best practices style guide security accessibility unhandled errors in angular performance keeping up to date developer events angular v22 release new angular v21 release extended ecosystem ngmodules legacy animations using rxjs with angular service workers pwas web workers custom build pipeline tailwind angular fire google maps google pay youtube player angular cdk angular material arrow_back angular cli overview local set up building angular apps serving angular apps for development deployment end to end testing migrating to new build system build environments angular cli builders generating code using schematics authoring schematics schematics for libraries template type checking ahead of time aot compilation aot metadata errors developer tools angular cli building angular apps you can build your angular cli application or library with the ng build command this will compile your typescript code to javascript as well as optimize bundle and minify the output as appropriate ng build only executes the builder for the build target in the default project as specified in angular json angular cli includes four builders typically used as build targets builder purpose angular build application builds an application with a client side bundle a node server and build time prerendered routes with esbuild angular devkit build angular browser esbuild bundles a client side application for use in a browser with esbuild see browser esbuild documentation for more information angular devkit build angular browser bundles a client side application for use in a browser with webpack angular build ng packagr builds an angular library adhering to angular package format applications generated by ng new use angular build application by default libraries generated by ng generate library use angular build ng packagr by default you can determine which builder is being used for a particular project by looking up the build target for that project projects my app architect ng build invokes the architect target named build build builder angular build application serve test this page discusses usage and options of angular build application on this page arrow_upward_alt back to the top output directory the result of this build process is output to a directory dist project_name by default configuring size budgets as applications grow in functionality they also grow in size the cli lets you set size thresholds in your configuration to ensure that parts of your application stay within size boundaries that you define define your size boundaries in the cli configuration file angular json in a budgets section for each configured environment configurations production budgets type initial maximumwarning 250kb maximumerror 500kb you can specify size budgets for the entire app and for particular parts each budget entry configures a budget of a given type for example the initial budget measures the javascript and css used to bootstrap the application which corresponds to the initial total value shown in the build output summary specify size values in the following formats size value details 123 or 123b size in bytes 123kb size in kilobytes 123mb size in megabytes 12 percentage of size relative to baseline not valid for baseline values when you configure a budget the builder warns or reports an error when a given part of the application reaches or exceeds a boundary size that you set each budget entry is a json object with the following properties property value type the type of budget one of value details bundle the size of a specific bundle use this type together with name to budget a specific bundle including a lazy loaded bundle initial the size of javascript and css needed for bootstrapping the application this corresponds to the initial total value shown in the build output summary defaults to warning at 500kb and erroring at 1mb allscript the size of all scripts all the size of the entire application anycomponentstyle this size of any one component stylesheet defaults to warning at 4kb and erroring at 8kb anyscript the size of any one script any the size of any file name the bundle name for type bundle this is the bundle name reported by the builder not the generated output filename baseline the baseline size for comparison if not set the baseline defaults to 0 and threshold values are calculated relative to that baseline maximumwarning the maximum threshold for warning relative to the baseline maximumerror the maximum threshold for error relative to the baseline minimumwarning the minimum threshold for warning relative to the baseline minimumerror the minimum threshold for error relative to the baseline warning the threshold for warning relative to the baseline min max error the threshold for error relative to the baseline min max to configure a budget for a lazy loaded bundle use type bundle and set name to that bundle s name budgets type bundle name admin maximumwarning 250kb maximumerror 300kb the name field matches the bundle name not the emitted filename so it does not use wildcard or regular expression patterns such as admin js the following example shows a budget that uses a baseline type bundle name main baseline 200kb maximumwarning 10 maximumerror 20 in this example the builder warns when the bundle grows beyond 220kb and errors when it grows beyond 240kb configuring commonjs dependencies always prefer native ecmascript modules esm throughout your application and its dependencies esm is a fully specified web standard and javascript language feature with strong static analysis support this makes bundle optimizations more powerful than other module formats angular cli also supports importing commonjs dependencies into your project and will bundle these dependencies automatically however commonjs modules can prevent bundlers and minifiers from optimizing those modules effectively which results in larger bundle sizes for more information see how commonjs is making your bundles larger angular cli outputs warnings if it detects that your browser application depends on commonjs modules when you encounter a commonjs dependency consider asking the maintainer to support ecmascript modules contributing that support yourself or using an alternative dependency which meets your needs if the best option is to use a commonjs dependency you can disable these warnings by adding the commonjs module name to allowedcommonjsdependencies option in the build options located in angular json build builder angular build application options allowedcommonjsdependencies lodash configuring browser compatibility the angular cli uses browserslist to ensure compatibility with different browser versions depending on supported browsers angular will automatically transform certain javascript and css features to ensure the built application does not use a feature which has not been implemented by a supported browser however the angular cli will not automatically add polyfills to supplement missing web apis use the polyfills option in angular json to add polyfills by default the angular cli uses a browserslist configuration which matches browsers supported by angular for the current major version to override the internal configuration run ng generate config browserslist which generates a browserslistrc configuration file in the project directory matching angular s supported browsers see the browserslist repository for more examples of how to target specific browsers and versions avoid expanding this list to more browsers even if your application code more broadly compatible angular itself might not be you should only ever reduce the set of browsers or versions in this list helpful use browsersl ist to display compatible browsers for a browserslist query configuring tailwind angular supports tailwind css a utility first css framework to integrate tailwind css with angular cli see using tailwind css with angular critical css inlining angular can inline the critical css definitions of your application to improve first contentful paint fcp this option is enabled default you can disable this inlining in the styles customization options this optimization extracts the css needed to render the initial viewport and inlines it directly into the generated html allowing the browser to display content faster without waiting for the full stylesheets to load the remaining css then loads asynchronously in the background angular cli uses beasties to analyze your application s html and styles social media blog x formerly twitter bluesky youtube discord github stack overflow community contribute code of conduct report issues google s devlibrary angular google developer experts resources press kit roadmap community translations azərbaycanca español français oʻzbekcha türkçe русский 한국어 日本語版 简体中文版 正體中文版 super powered by google 2010 2026 code licensed under an mit style license documentation licensed under cc by 4 0 built by angular at v22 2 6 sha ff0068a
|