Comparing Parcel 2 Features vs Parcel 1 Quiz Quiz

Discover how Parcel 2’s features compare to Parcel 1 with this focused quiz on bundling, configuration, plugin systems, and development experience. Assess your understanding of the latest changes and advancements between Parcel 2 and its predecessor, ideal for those interested in modern web bundling tools.

  1. Configuration Approach Evolution

    Which statement best describes the shift in configuration between Parcel 1 and Parcel 2 when starting a new project?

    1. Parcel 1 used only environment variables, but Parcel 2 does not support them at all.
    2. Parcel 2 removed all configuration options, supporting only defaults.
    3. Parcel 2 allows extensive configuration via a dedicated config file, unlike Parcel 1's zero-config default.
    4. Parcel 1 requires a YAML configuration file, whereas Parcel 2 only supports JSON.

    Explanation: Parcel 2 introduces a dedicated configuration file to enable more customization, whereas Parcel 1 emphasized zero-configuration by default. This provides developers with greater control and flexibility in Parcel 2. The other options are incorrect: Parcel 1 did not mandate YAML, both versions have some support for environment variables, and Parcel 2 did not remove configuration capabilities but expanded them.

  2. Plugin System Changes

    How has the plugin system changed from Parcel 1 to Parcel 2 to improve extensibility?

    1. Parcel 2 uses a modular plugin architecture, while Parcel 1 had built-in fixed plugins.
    2. Both versions support only one plugin at a time.
    3. Parcel 2 removed plugin support completely.
    4. Parcel 1 had more modular plugins than Parcel 2.

    Explanation: Parcel 2’s modular plugin architecture enables easier extension and customization without modifying the core system, whereas Parcel 1 relied on a limited set of built-in plugins. The claim that Parcel 1 was more modular is incorrect, and Parcel 2 did not abandon plugin support. Both versions allow multiple plugins, so the idea of supporting only one isn’t accurate.

  3. Monorepo and Multi-target Build Support

    In terms of supporting monorepo structures and multiple build targets, how does Parcel 2 improve over Parcel 1?

    1. Parcel 1 already had comprehensive multi-target and monorepo support.
    2. Parcel 2 removed the ability to build for multiple targets.
    3. Parcel 1 supported monorepos natively, while Parcel 2 does not.
    4. Parcel 2 introduces official multi-target build support, whereas Parcel 1 had only basic single-target builds.

    Explanation: Parcel 2 allows building for multiple targets such as browsers, modules, and more, simplifying workflows for complex projects, especially monorepos. In contrast, Parcel 1’s support for multi-target builds was limited and unofficial. The other options misrepresent the historic support in Parcel 1, or wrongly suggest Parcel 2 lost features.

  4. Development Server and Fast Refresh

    What feature related to development experience has Parcel 2 improved compared to Parcel 1, especially for JavaScript and React projects?

    1. Parcel 2 adds integrated fast refresh support out of the box, enhancing hot reloading for UI changes.
    2. Parcel 2 only reloads the entire browser page on code changes.
    3. Parcel 1 included fast refresh by default, but Parcel 2 removed it.
    4. Both versions lack development server capabilities.

    Explanation: Parcel 2’s integrated fast refresh provides more seamless hot module replacement, allowing UI changes to update instantly without losing state. Parcel 1 did not support fast refresh by default. The notion that Parcel 2 regressed to full page reloads is incorrect, and both versions include development server features, contrary to one option.

  5. Asset Type Expansion

    Regarding asset handling, how does Parcel 2 extend support for various file types compared to Parcel 1?

    1. Parcel 2 restricts asset types to only JavaScript and CSS.
    2. Parcel 2 supports custom asset pipelines for any file type via plugins, not just a limited built-in list.
    3. Parcel 1 already allowed unlimited file types with built-in pipelines.
    4. Parcel 1 and 2 only handle static images and scripts.

    Explanation: Parcel 2 enables developers to define how new file types are handled using its plugin system, expanding beyond the more restrictive built-in pipelines of Parcel 1. Parcel 1 didn’t allow unlimited file types without workarounds, and Parcel 2 does not restrict asset types. The last option incorrectly implies both versions are severely limited in asset processing.