I'm using flow and when I run the tests I get this error:
./src/modules/auth/index.js
Module build failed (from ./node_modules/@cypress/webpack-preprocessor/node_modules/babel-loader/lib/index.js):
SyntaxError: /home/fauna/workspace/console2/src/modules/auth/index.js: Support for the experimental syntax 'exportDefaultFrom' isn't currently enabled (8:8):
6 | const AUTH_CACHE_NAME = 'session'
7 |
8 | export type ModuleConfig = {
| ^
9 | secure: boolean,
10 | domain: ?string,
11 | expires: ?string,
Add @babel/plugin-proposal-export-default-from (https://git.io/vb4yH) to the 'plugins' section of your Babel config to enable transformation.
@ ./cypress/integration/auth/signIn_spec.js 2:0-55 16:6-14
I tried to use cypress preprocessor with webpack without success:
plugins/index.js
const webpack = require('@cypress/webpack-preprocessor')
module.exports = (on, config) => {
on('file:preprocessor', webpack())
}
You'll need to configure the webpack preprocessor with the appropriate plugin to support flow. Only standard JavaScript syntax is supported by default. If your app is already using webpack, you can pass in the webpack config your app uses.
Do you have some in-house solution to use with create-react-app webpack config?
@BrunoQuaresma No, we do not currently have an example of this webpack config. We do have some webpack config example in our https://github.com/cypress-io/cypress-example-recipes repo. Also - if you do find a solution, feel free to share or PR to that repo.
Any updates?