Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Cannot add plug-syntax-flow #58

Open
@frankhli843

Description

@frankhli843

Love cypress! Thanks in advance

I have the following configuration

// https://github.com/cypress-io/cypress-browserify-preprocessor#modifying-default-options
/**
 * This to modify Cypress web pack
 */
const browserify = require('@cypress/browserify-preprocessor')

module.exports = (on) => {
  const options = {
    extensions: ['.js', '.jsx', '.coffee'],
    transform: [
      [
        'coffeeify',
        {}
      ],
      [
        'babelify',
        {
          ast: false,
          babelrc: false,
          plugins: [
            '@babel/plugin-transform-modules-commonjs',
            '@babel/plugin-proposal-class-properties',
            '@babel/plugin-proposal-object-rest-spread',
            '@babel/plugin-transform-runtime',
            '@babel/plugin-syntax-flow'
          ],
          presets: [
            '@babel/preset-env',
            '@babel/preset-react',
            '@babel/preset-flow'
          ]
        },
      ]
    ],
    debug: true,
    plugin: [],
    cache: {},
    packageCache: {}
  }

  on('file:preprocessor', browserify(options))
}

in cypress/plugins/browsify.js

but still see the error
image

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