Skip to content

JSON files are not transformed via custom preprocessor #2578

@avaly

Description

@avaly

Report a bug

Jest is ignoring JSON files for applying custom preprocessors via the transform config.

What is the current behavior?

A JSON file source is never sent to a custom preprocessor configured to transform its source. Other files (e.g. XML) are sent properly to the preprocessor.

Reproduceable with the files from: https://gist.github.com/avaly/3ff041228a5c6f789119170c28a80367

What is the expected behavior?

The JSON file source should be sent to the preprocessor.

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

  • jest v18.1.0
  • node v6.9.4
  • yarn v0.18.1
  • Ubuntu 16.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions