mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-02 21:10:47 -05:00
5e4b638385
Co-authored-by: Jessica Sachs <jess@jessicasachs.io>
30 lines
735 B
JavaScript
30 lines
735 B
JavaScript
module.exports = {
|
|
presets: [
|
|
'@babel/preset-env',
|
|
'@babel/preset-react',
|
|
'@babel/preset-typescript',
|
|
],
|
|
plugins: [
|
|
// allow lazy loaded components with dynamic "import(...)"
|
|
// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import/
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
'@babel/plugin-proposal-class-properties',
|
|
// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs
|
|
// loose ES6 modules allow us to dynamically mock imports during tests
|
|
[
|
|
'@babel/plugin-transform-modules-commonjs',
|
|
{
|
|
loose: true,
|
|
},
|
|
],
|
|
[
|
|
'module-resolver',
|
|
{
|
|
alias: {
|
|
'@cypress/react': './dist',
|
|
},
|
|
},
|
|
],
|
|
],
|
|
}
|