- Notifications
You must be signed in to change notification settings - Fork 78
chore: Babel + Typescript example #408
Conversation
| @@ -0,0 +1,27 @@ | |||
| module.exports = { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified that it works also with babel.config.js. Should we rename this because 'cypress-react-unit-test/plugins/babelrc' looks confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, rename it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've been not clear. I mean the name of plugin itself. It will require breaking change, right? Or just make a new alias name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right - ok, in that case we probably better with an alias, like react-scripts is an alias to car.
| const webpackPreprocessor = require('@cypress/webpack-preprocessor') | ||
| const { addImageRedirect } = require('../utils/add-image-redirect') | ||
| | ||
| const wpPreprocessorOptions = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another question – do we need to keep using defaultOptions? Or we can just make our own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not change unless necessary
| # notice a trick to avoid re-installing dependencies | ||
| # in this job - a do-nothing "install-command" parameter | ||
| install-command: echo 'Nothing to install in this job' | ||
| # we are not going to use results from this job anywhere else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the motivation for using cypress/run instead of normal docker container with node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
caching, all OSS dependencies are present, restores the CircleCI workspace correctly. If you want to recreate this, see the expanded config at circle, it is giant https://app.circleci.com/pipelines/github/bahmutov/cypress-react-unit-test/635/config
this config is 330 lines, expanded 1000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally the above command would have "parallel" flag, in that case it skips the install. Since we are just reusing workspace from the previous install job, I have to hack skipping the install. I should probably just add a flag to our orb install: false to do this better
| super, looks good |
| 🎉 This PR is included in version 4.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…#408) * Add babel-typescipt example * Run new example on CI * chore: run markdown links checks only on main (cypress-io/cypress-react-unit-test#404) * chore: Improve typings (cypress-io/cypress-react-unit-test#405) * check out files before checking links * just use normal cypress run job * Improve Readme Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Created example and also make it possible to use
@babel/preset-typescriptwithout any additional webpack config mutation