Skip to content

Confusing error message for non-parallelizable plugin #155

Description

@dfreeman

Babel accepts plugins as (among other things) either a string denoting a module to require, or a tuple containing that string and optionally some configuration for that plugin. It will also accept a singleton array with just the module path as a sort of degenerate version of the second case, i.e.

plugins: [
  '/path/to/some/plugin.js',
  ['/path/to/some/plugin.js', { config: true }],
  ['/path/to/some/plugin.js']
]

For the third entry, the parallelization logic interprets that plugin as ['/path/to/some/plugin.js', undefined], and since undefined isn't JSON-serializable, the plugin is considered unparallelizable. That's easy enough to work around, but the error message we got with throwUnlessParallelizable turned on looked like:

[broccoli-persistent-filter:Babel > [Babel: ember-data]: Babel: ember-data] was configured to `throwUnlessParallelizable` and was unable to parallelize a plugin.
plugins:
1: name: unknown, location: unknown

If the relevant plugin path had been included in that output, it would have helped with tracking down the source of the problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions