QuizzesBundlers — What They Actually Do — Concept Check
intermediate
javascript

Bundlers — What They Actually Do — Concept Check

Questions on Bundlers — What They Actually Do. A bundler resolves your import graph, transforms each file, and emits chunks the browser can load efficiently. Tree shaking and code splitting are the two outputs that matter for users.

7 minutes 7 questions Pass at 70%
Time Limit
7 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

7 questions on Bundlers — What They Actually Do — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A developer notices that their web application is loading slowly due to many network requests. Which feature of a bundler can help reduce the number of requests?

    • ACode splitting
    • BBarrel files
    • CTree shaking
    • DDynamic imports
  2. 2.While analyzing a bundle, you find that lodash is included entirely even though only one function is used. What is likely the cause?

    • AUsing CommonJS imports
    • BCode splitting not applied
    • CDynamic imports
    • DTree shaking failure
  3. 3.A developer wants to ensure unused code is not shipped in their application. Which of the following is NOT a requirement for tree shaking to work?

    • ADynamic imports
    • BUsing ES modules
    • CNo top-level side effects
    • D"sideEffects": false in package.json
  4. 4.In a React application, which method allows a component to be loaded only when needed, reducing the initial bundle size?

    • ABarrel file import
    • BTree shaking
    • CDynamic import
    • DStatic import
  5. 5.A developer finds that their application bundle is unusually large. Which tool can they use to analyze the bundle size in a Next.js project?

    • Asource-map-explorer
    • BANALYZE=true npm run build
    • Cnpm ls react
    • Dvite-bundle-visualizer
  6. 6.A developer uses a barrel file to import a single component but notices an unexpected increase in bundle size. Why might this happen?

    • ACode splitting is disabled
    • BBarrel files prevent tree shaking
    • CBarrel files cause all exports to be analyzed
    • DDynamic imports are not used
  7. 7.What is the primary purpose of tree shaking in a bundler?

    • ATo transform TypeScript and JSX
    • BTo resolve node_modules
    • CTo split code into chunks
    • DTo remove unused code