skip to content

Build Tools & Bundlers

The rival bundlers, transpilers and framework CLIs that turn source into shipped files, each with its own config, CLI and plugins. Interviewers ask which one fits a project and what leaving it costs.

on this pageshow

explore

questions

103 · 4 sections

In a web build, what does `import thumbUrl from './specimen-thumb.png'` give your code, and when does the bundler inline the image instead?

level: juniorimportance: must knowfreq 24%
basics
~20 s

The import becomes a small generated module whose default export is a URL string pointing at a copy of the image the build emits. Files below a size threshold are often inlined instead, as a base64 data URL inside the importing file.

open as a page

In a web dev server, what is hot module replacement, and how does it differ from a live reload of the page?

level: juniorimportance: must knowfreq 26%
basics
~20 s

Hot module replacement swaps only the edited modules into the running page, so in-memory state such as a half-typed form can survive; a live reload requests the whole page again and re-runs every script, losing that state.

open as a page

In a web build, what is a module graph, and how does a bundler build one starting from an entry point?

level: juniorimportance: must knowfreq 24%
basics
~20 s

A module graph is every file an app needs, linked by its imports. A bundler starts at each entry, resolves each specifier to one file, parses that file for further imports and repeats until no new file appears.

open as a page

In a web build, what is a source map for, and how do browser developer tools find the map for a shipped file?

level: juniorimportance: must knowfreq 24%
basics
~20 s

A source map is a JSON file that maps positions in shipped, transformed code back to the original file, line, column and name. Developer tools find it through a sourceMappingURL comment at the end of the file or a SourceMap response header.

open as a page

What separates syntax lowering from a polyfill in a web build, and which one fixes `stop?.platform` versus `departures.at(-1)` on an older browser?

level: juniorimportance: must knowfreq 24%
basics
~20 s

Lowering rewrites newer syntax, such as optional chaining, into older equivalent code at build time; a polyfill ships runtime code that defines a missing built-in, such as Array.prototype.at. Neither can add an engine capability like Proxy.

open as a page

In a Vite config file, what does `defineConfig` do, and how do you give `vite` and `vite build` different settings?

level: juniorimportance: must knowfreq 24%
basics
~20 s

defineConfig only adds types for editor help and returns your config unchanged. To vary settings, export a function: Vite calls it with command ('serve' or 'build'), mode, isSsrBuild and isPreview, then uses the object it returns.

open as a page

In a Vite app, why does `import.meta.env.DONATIONS_SIGNING_KEY` read `undefined` in the browser while `import.meta.env.VITE_API_ORIGIN` has a value?

level: juniorimportance: must knowfreq 26%
basics
~10 s

Vite exposes on import.meta.env only variables whose names start with envPrefix, VITE_ by default, plus built-ins such as MODE, DEV, PROD, SSR and BASE_URL. Any other variable reads as undefined in client code.

open as a page

When `vite` starts a Vite 8 dev server, why does it pre-bundle dependencies, and what happens to a CommonJS package and a many-module package?

level: juniorimportance: must knowfreq 18%
basics
~20 s

Vite 8's dev server serves native ES modules, so it pre-bundles bare-imported dependencies with Rolldown: a CommonJS or UMD package is converted to ESM, and a package of hundreds of internal modules becomes one file fetched in one request.

open as a page

In Vite 8, what does running `vite build` on a single-page app do by default, from the entry it reads to the files it writes?

level: juniorimportance: must knowfreq 24%
basics
~20 s

vite build takes index.html as its entry, bundles the module graph with Rolldown, lowers and minifies JavaScript with Oxc and CSS with Lightning CSS, and writes content-hashed files into dist/assets, with no source maps unless build.sourcemap is set.

open as a page

In a Vite 8 project whose tsconfig.json maps `@/*` to `src/*`, why do `@/` imports type-check yet fail to resolve, and what fixes it?

level: middleimportance: must knowfreq 16%
basics
~10 s

TypeScript's paths only inform the type checker, and Vite 8 ignores them by default. Either declare resolve.alias with an absolute replacement, or set resolve.tsconfigPaths: true so Vite applies the tsconfig paths itself.

open as a page

With the Angular CLI, how does `ng serve` differ from `ng build`, and why is the dev server's output never what you deploy?

level: juniorimportance: must knowfreq 70%
basics
~20 s

ng serve runs the @angular/build:dev-server builder, which builds the app with its development configuration in memory, watches files and reloads the browser. ng build runs @angular/build:application with the production configuration and writes optimized, hashed files to dist/<project>/browser for deployment.

open as a page

With the Angular CLI, what does `ng generate library` add to a workspace, and what must happen before an app in that workspace can import it?

level: juniorimportance: must knowfreq 55%
basics
~20 s

ng generate library adds a library project under projects/ with its own ng-packagr build target, ng-package.json, package.json and public-api.ts, and maps the library name to dist/<name> in tsconfig paths. Apps import the built output, so build the library first.

open as a page

With the Angular CLI, what does `ng generate component` create in a v22 project, and how do you preview it before any file is written?

level: juniorimportance: must knowfreq 72%
basics
~10 s

ng generate component user-card runs the @schematics/angular:component schematic, which creates a user-card/ folder with user-card.ts, .html, .css and .spec.ts for a standalone UserCard class; --dry-run (-d) lists those files without writing them.

open as a page

With the Angular CLI's `ng serve`, how do you forward `/api` requests to a backend running locally on another port, and why does that not help in production?

level: juniorimportance: must knowfreq 62%
basics
~20 s

Create a proxy file such as src/proxy.conf.json mapping /api/** to the backend's target URL, set proxyConfig on the serve target, and restart ng serve. Only the dev server reads it, so production needs its own reverse proxy or CORS.

open as a page

With the Angular CLI, what does `ng update @angular/core @angular/cli` do beyond changing version numbers in package.json?

level: juniorimportance: must knowfreq 66%
basics
~20 s

ng update resolves compatible target versions for the named packages and their package groups, checks peer dependencies, requires a clean git tree, rewrites package.json, installs, then runs each updated package's migration schematics to change your code and configuration.

open as a page

How do you start a new Vue 3 project with create-vue, and why must the command be npm create vue@latest rather than npm create vue?

level: juniorimportance: must knowfreq 35%
basics
~10 s

Run npm create vue@latest, answer the prompts, then install dependencies and start the dev server. The @latest tag matters because without it npm may reuse a cached, outdated create-vue.

open as a page

In create-vue 3.24, what does selecting ESLint generate, why is Oxlint always added with it, and how does the Prettier choice fit in?

level: middleimportance: should knowfreq 20%
basics
~20 s

ESLint adds a flat eslint.config with the Vue and TypeScript presets, plus Oxlint with an .oxlintrc.json; the lint script runs both. Oxlint is always included and eslint-plugin-oxlint turns off ESLint rules it covers. Prettier adds its own config and a format script.

open as a page

When scaffolding an internal tool with create-vue, what do the TypeScript, Router, Pinia and Vitest choices each add to the generated project?

level: middleimportance: should knowfreq 26%
basics
~20 s

TypeScript adds tsconfig files, env.d.ts and a type-checking build script; Router adds vue-router with src/router and two views; Pinia adds pinia and a counter store; Vitest adds vitest.config, a jsdom test setup and an example spec.

open as a page

How do you run create-vue non-interactively from a script or CI job, and which prompts can still appear even when you pass feature flags?

level: seniorimportance: should knowfreq 15%
basics
~20 s

Pass a directory and feature flags after --, as in npm create vue@latest admin-tool -- --ts --router --pinia --vitest. Any feature flag skips the feature prompts, but a missing directory, a non-empty folder without --force or an invalid package name still prompts.

open as a page

In a create-vue TypeScript project, why does tsconfig.json list no files but reference tsconfig.app, tsconfig.node and tsconfig.vitest, and what does npm run build run?

level: seniorimportance: nice to knowfreq 13%
basics
~20 s

The root tsconfig.json only references separate projects: app code for the browser, tool configs for Node, and tests for jsdom, each with its own globals. npm run build runs vue-tsc --build and vite build in parallel.

open as a page