Zero configuration basics
When you start a new project with Parcel using only an index.html that links to a script and a stylesheet, what does its zero-configuration approach mean?
- You can run the bundler and it will automatically detect and bundle the linked assets without adding a config file.
- You must create a configuration file before anything can be bundled.
- You need to write a custom plugin to load CSS files.
- Only JavaScript files are bundled, while images and CSS are ignored.
- A remote server must be configured before local builds can run.
Instant updates during development
While developing with Parcel, you edit a CSS file and see the page update instantly without a full reload; which feature enables this behavior?
- Hot Module Replacement (HMR)
- Hard Module Reset (HMR)
- Hot Module Replacment (HMR)
- Heat Model Replacement
- Hot Model Reloading
Choosing an entry file
In a simple setup with Parcel, which entry file type lets the bundler automatically discover linked scripts, styles, and images?
- An HTML file such as index.html
- A stylesheet like main.css
- A vector image like app.svg
- A data file such as data.json
- A text document like readme.md
Code splitting in practice
Which approach triggers automatic code splitting in Parcel by loading a part of the app only when needed, for example when a user opens a settings panel?
- Using dynamic imports, for example import('./analytics-module'), will create a separate bundle that loads on demand.
- Using static imports, for example import './analytics-module', will always create a separate bundle.
- Using dynamic exports, for example export('./analytics-module'), will preload all dependencies.
- Using dynamic improv, for example impurt('./analytics-module'), optimizes CSS only.
- Using dyamic imports, for example import{'./analytics-module'}, merges all bundles into one.
Faster rebuilds with caching
What is the primary benefit of Parcel’s caching during development when you make a small change to a file?
- It caches intermediate build results to speed up subsequent builds after small changes.
- It uploads your build cache to a public server for sharing.
- It deletes cached files on every rebuild to ensure a clean state.
- It disables parallel work to avoid race conditions.
- It caches only images and ignores code changes.