QuizzesBuild Configuration — Targets, Polyfills and Env Vars — Concept Check
intermediate
javascript

Build Configuration — Targets, Polyfills and Env Vars — Concept Check

Questions on Build Configuration — Targets, Polyfills and Env Vars. Which browsers you compile for, what gets polyfilled, and how configuration reaches the client without leaking secrets.

8 minutes 8 questions Pass at 70%
Time Limit
8 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

8 questions on Build Configuration — Targets, Polyfills and Env Vars — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.Your team sets the compile target to ES5 for an application in 2026. What is a likely consequence?

    • AReduced need for polyfills
    • BLarger, slower bundles for modern browsers
    • CIncreased security vulnerabilities
    • DBetter performance in all browsers
  2. 2.A developer notices that `process.env.JWT_SECRET` is undefined in a client component. Why?

    • AThe variable name is misspelled
    • BThe environment variable is not defined in .env.local
    • CJWT_SECRET is not prefixed with NEXT_PUBLIC_
    • DJWT_SECRET is only available on the server side
  3. 3.You find that a feature using `Array.prototype.at` breaks in some browsers. What should you do?

    • ATranspile the code to an older syntax
    • BAdd a polyfill for `Array.prototype.at`
    • CChange the compile target to ES5
    • DRemove the feature from the application
  4. 4.Why might a developer use the NEXT_PUBLIC_ prefix for an environment variable?

    • ATo ensure it is available in both client and server components
    • BTo declare it as a secret variable
    • CTo make it public and accessible in the browser
    • DTo prevent it from being inlined into the bundle
  5. 5.A team uses `productionBrowserSourceMaps: true` in their Next.js app. What is a potential risk?

    • AReduced application performance
    • BIncreased build times
    • CImproved debugging capabilities
    • DExposing readable source code to the public
  6. 6.In a production build, why might a bug appear that wasn't present in development?

    • ASource maps are not generated
    • BReact strips dev warnings and uses a fast build
    • CThe NODE_ENV variable is set incorrectly
    • DThe application is using a different database
  7. 7.What happens if you change an environment variable prefixed with NEXT_PUBLIC_?

    • AThe variable becomes undefined
    • BChanges are reflected immediately in the browser
    • CYou must rebuild the application to see changes
    • DThe application crashes
  8. 8.Why should you avoid setting the compile target too low?

    • AIt leads to larger, slower bundles for modern browsers
    • BIt prevents the use of modern JavaScript features
    • CIt causes syntax errors in older browsers
    • DIt increases the need for polyfills