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

Cannot add plug-syntax-flow #58

Open
frankhli843 opened this issue Oct 19, 2020 · 0 comments
Open

Cannot add plug-syntax-flow #58

frankhli843 opened this issue Oct 19, 2020 · 0 comments

Comments

@frankhli843
Copy link

frankhli843 commented Oct 19, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant