From 1b49d254348db899bfae76d9408e176c0949ac3d Mon Sep 17 00:00:00 2001 From: Gleb Bahmutov Date: Mon, 6 Apr 2020 16:03:12 -0400 Subject: [PATCH] fix: the require format for react scripts task --- plugins/cra-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cra-v3/index.js b/plugins/cra-v3/index.js index 7778c892..57e7558d 100644 --- a/plugins/cra-v3/index.js +++ b/plugins/cra-v3/index.js @@ -1,8 +1,8 @@ const filePreprocessor = require('./file-preprocessor') module.exports = (on, config) => { + require('@cypress/code-coverage/task')(on, config) on('file:preprocessor', filePreprocessor(config)) - on('task', require('@cypress/code-coverage/task')(on, config)) // IMPORTANT to return the config object // with the any changed environment variables return config