-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for customizing babel configuration #343
Comments
This would be an excellent addition. We have a babel plugin specifically for our unit tests which lets us use a couple of webpack aliases in our unit tests without loading webpack. Once we have |
Looking to use something like this: in essence, what I want to be able to do is to access some util helpers with something like Current attempt fails, perhaps because I'm unable to get this plugged in |
I do something very similar to what you are saying using babel-plugin-webpack-alias |
Chiming in with my use-case. I have some stage features of JS that aren't available in Cypress (like Object Spread). Would love to have the ability to specify a custom |
@kentcdodds Came here to say the same thing! +1 |
Use case on my work project is accessing constants and helper functions (like Redux selectors) in the actual project from the Cypress tests. This goes beyond configuring babel itself, though, into bundler configuration. Because using ES2015+ code from Here's what my app needs:
|
Fixed by #888. |
Well this is a big deal 🎉 Thanks! |
Fixed in |
Check out how to modify the default options of the built-in browserify preprocesor or you may find the webpack preprocessor a better fit if you're already using webpack. |
Add support for specifying babel presets and plugins, so users can override the default ones.
Implementation notes:
Potentially auto-load a
.babelrc
in the project root. Keep in mind that a user could have an older version of babel installed for their project that isn't compatible with Cypress's version.Support having a
.babelrc
in thecypress
directory that is preferred over one in the project root. Also, explore if there's a need/use case for specifying the preset/plugins incypress.json
under ababel
namespace.Write documentation detailing the current defaults and how to override them.
The text was updated successfully, but these errors were encountered: