forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
29 lines (29 loc) · 756 Bytes
/
babel.config.js
File metadata and controls
29 lines (29 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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/cypress-react.cjs.js',
},
},
],
],
}